gixy
gixy copied to clipboard
Detect unsafe internal redirection
For example:
rewrite ^/(.*)/some$ /$1/ last;
location ~* ^/internal-proxy/(?<proxy_proto>https?)/(?<proxy_host>.*?)/(?<proxy_path>.*)$ {
internal;
proxy_pass $proxy_proto://$proxy_host/$proxy_path ;
proxy_set_header Host $proxy_host;
}
Unfortunately, it is not easy to implement this. Perhaps better for now just report about any internal locations and possible rewrites with INFO severity.