location /name/ {
rewrite /name/([^/]+) /users?name=$1 break;
proxy_pass http://127.0.0.1;
}
proxy_hide_header Set-Cookie;
proxy_ignore_headers Set-Cookie;
# important! Remember the special inheritance rules for proxy_set_header:
# http://nginx.org/ru/docs/http/ngx_http_proxy_module.html#proxy_set_header
proxy_set_header Cookie "";
location ~ ^/xml/(.+)$ {
rewrite ^/xml/(.+)$ /$1 break;
proxy_pass https://httpbin.org;
}
location / {
try_files $uri $uri/ @storage;
}
location @storage {
rewrite ^/.+/(.+)$ /defaultfolder/$1;
}
listen = 9000
listen = 127.0.0.1:9000