We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Irrelevant but Nitro 2.8.1 on Node 20.5
Issue is visible in:
https://github.com/unjs/nitro/blob/06323b736f0d8adaa609d5a0348fa6b9e0db75e7/src/dev/server.ts#L203-L205
The X-Forwarded-Proto header should take a value in [http, https], and instead takes a value in [IPv4, IPv6]
http
https
IPv4
IPv6
With the current code, accessing a Nitro server with plaintext results in X-Forwarded-Proto: IPv4 (for example)
X-Forwarded-Proto: IPv4
This is not correct, and should instead give X-Forwarded-Proto: http
X-Forwarded-Proto: http
Since it is not a standardised header, the best source of documentation is your pick between: a. The Mozilla docs about the de-facto way it is meant to work: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Proto#syntax b. The spec for the Forwarded header which is based on it (and other X-Forwarded-* friends): https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Forwarded#proto c. Nearly every (widespread) webserver in existence (CF: https://developers.cloudflare.com/fundamentals/reference/http-request-headers/#x-forwarded-proto, AWS: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/x-forwarded-headers.html#x-forwarded-proto, HAProxy: https://docs.haproxy.org/2.8/configuration.html#7.3.1-iif, ...)
Forwarded
No response
The text was updated successfully, but these errors were encountered:
This is causing me a problem implementing tus-node-server in nuxt
Sorry, something went wrong.
Seems reasonable IMO. PR Welcome 👍🏻
29ddd94
Successfully merging a pull request may close this issue.
Environment
Irrelevant but Nitro 2.8.1 on Node 20.5
Reproduction
Issue is visible in:
https://github.com/unjs/nitro/blob/06323b736f0d8adaa609d5a0348fa6b9e0db75e7/src/dev/server.ts#L203-L205
Describe the bug
The X-Forwarded-Proto header should take a value in [
http
,https
], and instead takes a value in [IPv4
,IPv6
]With the current code, accessing a Nitro server with plaintext results in
X-Forwarded-Proto: IPv4
(for example)This is not correct, and should instead give
X-Forwarded-Proto: http
Additional context
Since it is not a standardised header, the best source of documentation is your pick between:
a. The Mozilla docs about the de-facto way it is meant to work: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Proto#syntax
b. The spec for the
Forwarded
header which is based on it (and other X-Forwarded-* friends): https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Forwarded#protoc. Nearly every (widespread) webserver in existence (CF: https://developers.cloudflare.com/fundamentals/reference/http-request-headers/#x-forwarded-proto, AWS: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/x-forwarded-headers.html#x-forwarded-proto, HAProxy: https://docs.haproxy.org/2.8/configuration.html#7.3.1-iif, ...)
Logs
No response
The text was updated successfully, but these errors were encountered: