-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
rewrite
double-encodes url
#4515
Comments
Yeah, logs with the
|
I was right, it is the encoding.
|
Do note, I do kind of expect to have the un-encoded URL sent to my backend, as it only happens with rewrite |
Where are those logs from? Those aren't Caddy's logs. Please provide us with which version of Caddy you're using, and debug logs from Caddy. |
Those are logs from my own backend, https://github.com/l1ving/fs-over-http I'll grab the debug logs in a second. I'm running |
Please also try upgrading to v2.4.6. |
Where can I find the logs that Caddy generates? I have it running in the background, I've added |
Caddy outputs its logs to stdout/stderr. It depends how you're running Caddy. |
these are the logs from v2.4.6, the issue is still present
Command ran: curl -X POST https://i.l1v.in/i/·∵…•⋮∵·.png; curl -X POST https://frogg.ie/i/·∵…•⋮∵·.png |
Alright, I think I can replicate the issue.
When rewriting, the path gets double-encoded. I'm not sure what the fix is for I do have a workaround for you though. Instead of using
Basically this will replace the leading Also FYI, your Caddyfile can be simplified to this (you can just match on
|
I've confirmed that your workaround does indeed fix the issue, thank you :) |
rewrite
+ reverse_proxy
doesn't work with unicoderewrite
double-encodes url
I have a fix in #4516 |
Geez, you all fast. |
Caddyfile:
Caddyfile
Relevant section:
Example:
frogg.ie
(Caddy rewrite)i.l1v.in/i/
(original host)Other example (to prove rewrite works as intended):
frogg.ie
i.l1v.in/i/
My best guess is that Caddy's rewrite is doing something weird to the encoding here.. I will try to get debug output
The text was updated successfully, but these errors were encountered: