P
P
pro100sanya2016-12-12 12:35:53
Nginx
pro100sanya, 2016-12-12 12:35:53

How to encode unsafe characters in HTTP query string using NGINX?

Greetings!
I have a running nginx instance that proxies requests to
a web server. From time to time, requests come in, in the query string (query string) of which
there are characters '{' and '}'. And what is most interesting - the browser does not encode them.
For example, if they were encountered on the way, then the browser would encode them, but
not in the query string. So, according to the specification, these characters are considered unsafe and must
be encoded anyway.
When such a request comes to the web server (netty) it will throw an error.
The question itself is: how to use nginx to escape the query string so that unsafe
characters are replaced with the corresponding %XX sequence?
Are there options without connecting the lua module?
PS> at the level of the framework, I can not solve the issue, because it does not reach it.
The whole problem is at a low level, where there is no access. The only option is to
modify the request using nginx.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question