Welcome! Log In Create A New Profile

Advanced

Nginx Auth Request By Source IP

John Baird
October 19, 2017 03:00PM
I have been doing some reading an googling, and I am wondering if someone
can help.

I have an oauth2 service successfully authenticating nginx visitors.
Because Nginx is fronting a web application on the backend, the web
application does NOT have valid domain credentials to interact with the
nginx layer.

Goal:
I would like to be able to do something like the following:

geo $localhost {
default 0;
127.0.0.1/32 1;
}

server {
location / {
if ($localhost = 0) {
auth_request = /oauth2/callback
....
}
}
}

Is this possible?
TL;DR -> bypass nginx oauth2 auth_request module when source ip is localhost
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx Auth Request By Source IP

John Baird October 19, 2017 03:00PM

Re: Nginx Auth Request By Source IP

Grzegorz Kulewski October 19, 2017 03:10PM

Re: Nginx Auth Request By Source IP

John Baird October 19, 2017 03:16PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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