302 redirect is responded with broken URL 404 error.

Not applicable

I've created proxy for my website:

Proxy URL: http://example.com/v1/abc

When I call target endpoint directly, example: GET http://example.com/v1/abc/admin

Proxy path will be substituted with load balancer url and hit the target server with - http://loadbalancer.com/admin

Here we have redirect to login page - http://sso.login.com/login?goto=http://example.com/v1/abc/admin

After successful login I get the response of 302 redirect to http://example.com/admin

I am expecting a response path to be http://example.com/v1/abc/admin

when i fix the response path from http://example.com/admin to http://example.com/v1/abc/admin....302 redirects goes into loop. Thanks in advance.

0 4 1,357
4 REPLIES 4

what vhost are you using and how/where did you configure the redirect ?

redirect response is coming from application side.i am not sure what is vhost.

Hi Lipika, you wrote:

After successful login I get the response of 302 redirect to http://example.com/admin

from where do you get that response? Which system is issuing the 302? How does that system know about example.com . I would think the correct location included in a 302 response issued from a backend would be loadbalancer.com/admin, not example.com/admin .

We need more context to understand what's happening. Maybe a diagram would help? Can you provide one?