
아래와 같은 구성이 있습니다. IP 목록이 인증을 우회하도록 허용하고 싶습니다.
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;
}
}
위에 이것을 추가하려고 시도했지만 auth_request
도움이 되지 않는 것 같습니다. 요청이 허용된 IP에서 오는 것을 로그에서 볼 수 있습니다.
satisfy all;
allow 10.0.0.0/16;
allow 56.56.56.56/28;
deny all;
업데이트: IP 주소 우회를 수정 satisfy all
하도록 수정했습니다.satisfy any