Welcome! Log In Create A New Profile

Advanced

auth_request static file

November 06, 2023 05:40PM
I have

location /secret {
proxy_pass http://127.0.0.1:9090;
proxy_redirect default;
proxy_http_version 1.1;
auth_request /auth;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-forwarded-For $remote_addr;
}

location = /auth {
proxy_pass http://service/auth;
proxy_set_header Host $host;
proxy_pass_request_body off;
proxy_set_header X-Original-URI $request_uri;
}

And when I goto http://server/secret it authenticates me fine


location /secret2 {
auth_request /auth;
root /var/data/static;
}

When I goto http://server/secret2 I get a 401. I am not sure why. It should automatically authenticate me.
Subject Author Posted

auth_request static file

uragnorson November 06, 2023 05:40PM

Re: auth_request static file

uragnorson November 06, 2023 05:42PM

Re: auth_request static file

uragnorson November 06, 2023 05:45PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 112
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready