Skip to content
New issue

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

Option to let Fresh respect X-Forwarded-* headers? #2660

Open
dahlia opened this issue Sep 27, 2024 · 0 comments
Open

Option to let Fresh respect X-Forwarded-* headers? #2660

dahlia opened this issue Sep 27, 2024 · 0 comments

Comments

@dahlia
Copy link

dahlia commented Sep 27, 2024

I'd like to run Fresh behind a reverse proxy for both development and production. However, currently Fresh does not respect X-Forwarded-* headers, so when I try to get ctx.url it returns an http:// URL instead of https:// URL even though an X-Forwarded-Proto: https header is provided.

So, it would be nice if App.listen() has an option to let Fresh respect X-Forwarded-Proto and X-Forwarded-Host headers. Would it be a good idea? If so, I'd like to send a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant