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

http_redirect module prefer 307 Temporary Redirect #6499

Open
robballantyne opened this issue Aug 7, 2024 · 2 comments
Open

http_redirect module prefer 307 Temporary Redirect #6499

robballantyne opened this issue Aug 7, 2024 · 2 comments

Comments

@robballantyne
Copy link

Hello,

I am using the http_redirect module to automatically upgrade HTTP connections to HTTPS on a single port, but as far as I can see there is no way to set headers and I would prefer that the redirect is not cached.

My current solution is to simply modify the built-in response code to 307 Temporary Redirect and build with xcaddy, but I was hoping you'd be open to either making 307 the default, or keeping the current default with an option to either add custom headers or specify the redirect code as with a normal redirect.

If there is a better way to approach this I would be really grateful if you could point me in the right direction - And thank you for your work on Caddy, I switched from NGINX and haven't looked back

Cheers!

@francislavoie
Copy link
Member

francislavoie commented Aug 7, 2024

Yeah we can add an option for that 👍 PR welcome if you want to take a shot at it.

@robballantyne
Copy link
Author

Thanks - I'm not a Go dev, so not really sure what I am doing but I'll give it a try

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

2 participants