Skip to content

HTTP -> HTTPS redirection discards query param #163

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

Closed
xiaq opened this issue Mar 13, 2025 · 1 comment · Fixed by #164
Closed

HTTP -> HTTPS redirection discards query param #163

xiaq opened this issue Mar 13, 2025 · 1 comment · Fixed by #164

Comments

@xiaq
Copy link

xiaq commented Mar 13, 2025

  1. Configure http://go/ex -> http://example.com
  2. Go to http://go/ex?foo=bar -> this redirects to http://example.com with no query param
  3. Go to https://go.$name.ts.net/ex?foo=bar -> this redirects to http://example.com/?foo=bar as expected

curl seems to confirm that the query param was lost in the HTTP -> HTTPS redirection:

~> curl -IL 'http://go/ex?foo=bar'
HTTP/1.1 302 Found
Content-Type: text/html; charset=utf-8
Location: https://go.REDACTED.ts.net/ex
Date: Thu, 13 Mar 2025 17:35:42 GMT

HTTP/1.1 302 Found
Location: http://example.com
Date: Thu, 13 Mar 2025 17:35:42 GMT

HTTP/1.1 200 OK
Content-Type: text/html
ETag: "84238dfc8092e5d9c0dac8ef93371a07:1736799080.121134"
Last-Modified: Mon, 13 Jan 2025 20:11:20 GMT
Cache-Control: max-age=544
Date: Thu, 13 Mar 2025 17:35:42 GMT
Connection: keep-alive
patrickod added a commit that referenced this issue Mar 13, 2025
Preserve query parameters when redirecting from HTTP to HTTPS where
previously they were omitted.

Fixes #163
patrickod added a commit that referenced this issue Mar 13, 2025
Preserve query parameters when redirecting from HTTP to HTTPS where
previously they were omitted.

Fixes #163

Signed-off-by: Patrick O'Doherty <patrick@tailscale.com>
@patrickod
Copy link
Contributor

Thank you for the report, this should now be resolved via #164

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

Successfully merging a pull request may close this issue.

2 participants