mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 16:59:22 +02:00
forward-auth: fix special character support for nginx (#1578)
This commit is contained in:
parent
eb19d6e125
commit
c199909032
5 changed files with 17 additions and 10 deletions
|
@ -37,7 +37,8 @@ server {
|
|||
client_max_body_size 1m;
|
||||
|
||||
# Pass the extracted client certificate to the auth provider
|
||||
set $target http://pomerium/verify?uri=$scheme://$http_host$request_uri;
|
||||
|
||||
set $target http://pomerium/verify?uri=$scheme://$http_host$request_uri&rd=$pass_access_scheme://$http_host$escaped_request_uri;
|
||||
proxy_pass $target;
|
||||
}
|
||||
|
||||
|
@ -45,7 +46,7 @@ server {
|
|||
internal;
|
||||
add_header Set-Cookie $auth_cookie;
|
||||
return 302
|
||||
https://fwdauth.localhost.pomerium.io/?uri=$scheme://$host$request_uri;
|
||||
https://fwdauth.localhost.pomerium.io/?uri=$scheme://$host$request_uri&rd=$pass_access_scheme://$http_host$escaped_request_uri;
|
||||
}
|
||||
|
||||
location / {
|
||||
|
|
|
@ -19,6 +19,8 @@ proxy_set_header Upgrade $http_upgrade;
|
|||
|
||||
proxy_set_header Connection "";
|
||||
|
||||
set_escape_uri $escaped_request_uri $request_uri;
|
||||
|
||||
# proxy_set_header X-Request-ID $req_id;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue