I am using nginx as a reverse proxy in front of my NodeJS app.
When the request body contains certain characters, an example of which is exactly what is in the parentheses ('<<'), nginx throws a 403 error
I am really pulling my hair out here. Any suggestions gratefully received!
The pertinent config looks like:
location / {
client_max_body_size 100M;
proxy_read_timeout 900;
proxy_pass_header Server;
proxy_request_buffering off;
proxy_cookie_path ~*^/.* /;
if ( $request_uri ~ ^/(.*)$ ) {
proxy_pass http://127.0.0.1:8080/$1;
}
proxy_pass http://127.0.0.1:8080/;
proxy_set_header X-frontend-Override-Base-Url $http_x_forwarded_proto://$host:$server_port;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}