0

I have config in my nginx:

    location /image-optimizer/ {
        proxy_pass http://192.168.1.20:80/;
    }

The problem is when nginx proxy passes it removes double trailing slash in path parameter. For example when I call:

http://localhost/image-optimizer/upload/w_500,h_500,q_90/https://m0.cl/t/butterfly-3000.jpg

service on 192.168.1.20:80 receive: http://192.168.1.20:80/upload/w_500,h_500,q_90/https:/m0.cl/t/butterfly-3000.jpg

Nginx removes double // in https://

How to avoid it?

P.s. Trying with urlencode with no luck.

https%3A%2Fm0.cl%2Ft%2Fbutterfly-3000.jpg

0

You use this directive

merge_slashes off;

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.