springmvc 路径参数有花括号导致400错误
#nginx地址重写,替换掉url 并且防止url decode方法
location /foo/bar/ { rewrite ^ $request_uri; #转发原始url rewrite ^/foo/bar(/.*) /foo$1 break; #重定向,去掉url中的/bar后缀 proxy_pass http://localhost$uri; #代理到新地址,并且转发原始的url,避免url解码 proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; }