Skip to content

with proxy_connect i cannot intercept errors with error_page #108

@hbvenancio

Description

@hbvenancio

Hi,
first of all congratulations for the module!

I have built and installed it successfully (on linux). It works fine as a forward-proxy but it seems i cannot proxy_intecept_errors.
I am able to "intercept" the requests passing through nginx but not the responses and rewriting them. In the below example i am trying to intercept the 401 HTTP code and rewrite it to 302, but seems i am not able to intercept errors ?

server \{
    listen 8755;
    proxy_connect;
    location / \{
      proxy_pass https://intrauat.web.bc;

      proxy_intercept_errors on;
      error_page 401 = @rewrite_401;
    }

    location @rewrite_401 \{
      return 302 https://intrauat.web.bc/login;
    }
 }

I am not sure whether this is by-design, a bug, or even a feature not yet implemented.

Could you please help me understanding ?

Many thanks in advance.
BR,
Hugo

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions