n2proxy icon indicating copy to clipboard operation
n2proxy copied to clipboard

handling redirects

Open dtenenba opened this issue 6 years ago • 0 comments

I am running n2proxy -backend http://localhost:8000 -port 5000

Hitting the / endpoint of that backend redirects (with a 301 or 302) to http://localhost:8000/login. Unfortunately if I go to http://localhost:5000 I end up with http://localhost:8000/login in my browser address bar. What I want is http://localhost:5000/login. Do you know how to fix this?

Seems I need to intercept the Location header and rewrite it.

dtenenba avatar Nov 15 '19 23:11 dtenenba