tianon / squignix

NGINX, configured to act like Squid
MIT License
32 stars 5 forks source link

infinite loop if squignix tries to proxy to itself #1

Closed tianon closed 6 years ago

tianon commented 6 years ago

Fun times abound if you manage to get squignix to try proxying itself (easiest way is by curling the IP of squignix itself without a proper Host header so it thinks it should try redirecting to itself).

I think the easiest way to fix this is to add X-Squignix: true to our proxied request which we can then detect and not even try to redirect for ourselves (and instead simply return immediate failure).