Welcome! Log In Create A New Profile

Advanced

how to forward basic-auth from upstream

mex
March 10, 2016 11:19AM
hi list,


i have an nginx infront of apaches, and the apacheshold a list of locations
with basic-auth.

i cannot pass the auth-request from the upstream through nginx to
the user, when i access the urls through nginx i get 403 Forbidden,
while direct access sends the correct 401 Authorization Required
back.

is there a simple way to passthrough the auth-request without
doing nginx basic-auth itself?


what i've done so far (in any variation)


location /authme {
...
proxy_pass_header Authorization;
more_set_headers -s 401 'WWW-Authenticate: Basic realm="$host"';
more_set_input_headers 'Authorization: $http_authorization';
...
}


cheers,

mex
Subject Author Posted

how to forward basic-auth from upstream

mex March 10, 2016 11:19AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 293
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready