Skip to content

Special characters are wrongly encoded/decoded #2174

Answered by vpas88
vpas88 asked this question in Q&A
Discussion options

You must be logged in to vote

OK, finally I have manage to solve the problem. I'm putting the solution here for future reference; when using NGINX and URI is parsed in location proxy_pass will get the decoded value.
My solution was that:

location ~ ^/api/(.*)$ {
	rewrite  ^/api/(.*)$ $1$is_args$args break;
	proxy_pass http://127.0.0.1:19960;
}

This way the original percentage-encoded format is passed towards gunicorn/falcon and they will parse it properly.

Replies: 3 comments 13 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
13 replies
@vpas88
Comment options

@vytas7
Comment options

@vpas88
Comment options

@vpas88
Comment options

Answer selected by CaselIT
@vytas7
Comment options

@CaselIT
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
3 participants
Converted from issue

This discussion was converted from issue #2173 on September 17, 2023 17:09.