
Ich habe eine Konfiguration wie unten. Ich möchte einer Liste von IPs erlauben, die Authentifizierung zu umgehen.
server {
listen 80;
server_name test2.example.com;
add_header Strict-Transport-Security max-age=2592000;
location = /oauth2/auth {
internal;
proxy_pass http://oauth.example.com:4180;
}
location /oauth2/ {
proxy_pass http://oauth.example.com:4180;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
}
location / {
auth_request /oauth2/auth;
error_page 401 = /oauth2/start?rd=$request_uri;
proxy_pass https://test.example.com;
}
}
Ich habe versucht, dies oben hinzuzufügen, auth_request
aber das scheint nicht zu helfen. Ich kann in den Protokollen sehen, dass die Anfrage von Whitelist-IPs kommt.
satisfy all;
allow 10.0.0.0/16;
allow 56.56.56.56/28;
deny all;
Update: Änderung satisfy all
zur satisfy any
Behebung der Umgehung für IP-Adressen.