nginx removes double slashes

Gregory Edigarov edigarov at
Mon Dec 29 11:04:06 UTC 2014

Hello everybody,

perhaps I am doing something wrong:

         location /njs/ {
                 rewrite /njs/(.*)$ /$1 break;
                 proxy_redirect off;
                 proxy_set_header Host $http_host;
                 proxy_set_header X-Real-IP $remote_addr;
                 proxy_set_header X-Forwarded-For 
                 proxy_set_header X-Forwarded-Proto $scheme;
                 proxy_pass http://localhost:4006;

calling this

and I definitely see that to my application it comes like:
note the single '/', when I need '//'

Is there any way to handle it?
With best regards,
       Gregory Edigarov

More information about the nginx mailing list