-
-
Notifications
You must be signed in to change notification settings - Fork 122
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
Docker image will not serve on HTTP if the site URL is https #1000
Comments
Other notes:
Possible solutions:I'm happy to open a pull request for either of the first 2 options, if there's a consensus about which one to implement. Option 1: HTTP Catch-allChange the Caddyfile built into the image to include an This could have security implications (in that users could access the panel without SSL) but administrators could solve them by not forwarding port 80. That would cause connection refused errors should someone explicitly specify http://, should not affect modern browsers that use HTTPS by default. Example (this is what I've used in my test deployment):
Option 2: New Environment VariableCreate a new environment variable, such as Option 3: Document SKIP_CADDYDocument that running the panel behind a proxy that terminates TLS will not work and that users who want to do so should use |
I've enabled caddy and served container port 80 to host port 9001 with a custom caddy file |
That's the Option 3 I listed (use SKIP_CADDY and host entirely with an external web server). It is a valid workaround, but I would much prefer to keep the panel container self-contained and reverse proxy to its built-in webserver. |
I agree at this point |
Current Behavior
The Caddyfile uses the
SITE_URL
environment variable to set the route on which Caddy will serve the panel.If you place the panel behind a reverse proxy that provides and terminates TLS (such as a different Caddy instance used to serve multiple sites),
SITE_URL
is supposed to start with https://.With SITE_URL beginning https://, Caddy will redirect any traffic on port 80 (including from the reverse proxy server in front of it) to 443, causing too many redirects.
Expected Behavior
Caddy allow the site to be served on HTTP or HTTPS, regardless of the
SITE_URL
.Steps to Reproduce
To reproduce the redirect behavior:
To reproduce the too many redirects error:
Panel Version
v1.0.0-beta17
Wings Version
N/A
Games and/or Eggs Affected
N/A
Docker Image
N/A
Error Logs
Is there an existing issue for this?
The text was updated successfully, but these errors were encountered: