Welcome! Log In Create A New Profile

Advanced

auth_request not passing query string

May 11, 2021 04:17PM
Hi All, i'm trying to configure a auth based static files server using nginx, but its not working because, i suppose, the $request_uri is not being forwarded to the auth endpoint. Does auth_request support relaying $request_uri ? If someone could give a tip i would be very grateful.


server {
listen 443 ssl;
listen [::]:443 ssl;

ssl_certificate ....;
ssl_certificate_key ....;

root /path/to/static/html;
index index.html index.htm index.nginx-debian.html;

server_name ...;

location / {
auth_request /validate;
auth_request_set $auth_status $upstream_status;
try_files $uri $uri/ =404;
}

location /validate {
proxy_pass https://validation.mysite.com/validate/;

proxy_ssl_certificate ...;
proxy_ssl_certificate_key ...;

proxy_pass_request_headers on;

proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Original-URI $request_uri;
}

}

Thanks in advance.
Subject Author Posted

auth_request not passing query string

rsavignon May 11, 2021 04:17PM

Re: auth_request not passing query string

Francis Daly May 11, 2021 05:32PM

Re: auth_request not passing query string

rsavignon May 11, 2021 07:05PM

Re: auth_request not passing query string

Francis Daly May 11, 2021 07:40PM

Re: auth_request not passing query string

rsavignon May 12, 2021 09:55AM

Re: auth_request not passing query string

Francis Daly May 12, 2021 10:22AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 244
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