Welcome! Log In Create A New Profile

Advanced

multipart form POST request fails with 403 when body contains certain characters

Posted by Neil Street 
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;
}
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 198
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready