Do not set the remote_user header everywhere.

This commit is contained in:
Andrea Dell'Amico 2021-11-04 17:38:11 +01:00
parent 17a5b855b6
commit 91d0eb88e0
Signed by: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 50 additions and 35 deletions

View File

@ -41,8 +41,8 @@ server {
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Original-URI $request_uri;
proxy_set_header Authorization "Bearer $auth_token";
proxy_set_header remote_user "$remote_user";
#proxy_set_header Authorization "Bearer $auth_token";
#proxy_set_header remote_user "$remote_user";
proxy_pass http://_inception-server;
}
@ -57,8 +57,8 @@ server {
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Original-URI $request_uri;
proxy_set_header Authorization "Bearer $auth_token";
proxy_set_header remote_user "$remote_user";
#proxy_set_header Authorization "Bearer $auth_token";
#proxy_set_header remote_user "$remote_user";
proxy_pass http://_inception-server;
}
@ -72,8 +72,8 @@ server {
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Original-URI $request_uri;
proxy_set_header Authorization "Bearer $auth_token";
proxy_set_header remote_user "$remote_user";
#proxy_set_header Authorization "Bearer $auth_token";
#proxy_set_header remote_user "$remote_user";
proxy_pass http://_inception-server;
}
@ -88,8 +88,8 @@ server {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Original-URI $request_uri;
proxy_set_header Authorization "Bearer $auth_token";
proxy_set_header remote_user "$remote_user";
proxy_pass http://_inception-server;
#proxy_set_header remote_user "$remote_user";
#proxy_pass http://_inception-server;
}
location ~ /projects.html.* {
@ -102,8 +102,8 @@ server {
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Original-URI $request_uri;
proxy_set_header Authorization "Bearer $auth_token";
proxy_set_header remote_user "$remote_user";
#proxy_set_header Authorization "Bearer $auth_token";
#proxy_set_header remote_user "$remote_user";
proxy_pass http://_inception-server;
}
@ -117,8 +117,8 @@ server {
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Original-URI $request_uri;
proxy_set_header Authorization "Bearer $auth_token";
proxy_set_header remote_user "$remote_user";
#proxy_set_header Authorization "Bearer $auth_token";
#proxy_set_header remote_user "$remote_user";
proxy_pass http://_inception-server;
}
@ -132,8 +132,8 @@ server {
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Original-URI $request_uri;
proxy_set_header Authorization "Bearer $auth_token";
proxy_set_header remote_user "$remote_user";
#proxy_set_header Authorization "Bearer $auth_token";
#proxy_set_header remote_user "$remote_user";
proxy_pass http://_inception-server;
}
@ -147,8 +147,8 @@ server {
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Original-URI $request_uri;
proxy_set_header Authorization "Bearer $auth_token";
proxy_set_header remote_user "$remote_user";
#proxy_set_header Authorization "Bearer $auth_token";
#proxy_set_header remote_user "$remote_user";
proxy_pass http://_inception-server;
}
@ -162,12 +162,12 @@ server {
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Original-URI $request_uri;
proxy_set_header Authorization "Bearer $auth_token";
proxy_set_header remote_user "$remote_user";
#proxy_set_header Authorization "Bearer $auth_token";
#proxy_set_header remote_user "$remote_user";
proxy_pass http://_inception-server;
}
location /whoops.* {
location ~ /whoops.* {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Connection ""; # Clear for keepalive
@ -177,8 +177,23 @@ server {
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Original-URI $request_uri;
proxy_set_header Authorization "Bearer $auth_token";
proxy_set_header remote_user "$remote_user";
#proxy_set_header Authorization "Bearer $auth_token";
#proxy_set_header remote_user "$remote_user";
proxy_pass http://_inception-server;
}
location /whoops {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Connection ""; # Clear for keepalive
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Original-URI $request_uri;
#proxy_set_header Authorization "Bearer $auth_token";
#proxy_set_header remote_user "$remote_user";
proxy_pass http://_inception-server;
}
@ -192,8 +207,8 @@ server {
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Original-URI $request_uri;
proxy_set_header Authorization "Bearer $auth_token";
proxy_set_header remote_user "$remote_user";
#proxy_set_header Authorization "Bearer $auth_token";
#proxy_set_header remote_user "$remote_user";
proxy_pass http://_inception-server;
}
@ -207,8 +222,8 @@ server {
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Original-URI $request_uri;
proxy_set_header Authorization "Bearer $auth_token";
proxy_set_header remote_user "$remote_user";
#proxy_set_header Authorization "Bearer $auth_token";
#proxy_set_header remote_user "$remote_user";
proxy_pass http://_inception-server;
}
@ -222,8 +237,8 @@ server {
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Original-URI $request_uri;
proxy_set_header Authorization "Bearer $auth_token";
proxy_set_header remote_user "$remote_user";
#proxy_set_header Authorization "Bearer $auth_token";
#proxy_set_header remote_user "$remote_user";
proxy_pass http://_inception-server;
}
@ -237,8 +252,8 @@ server {
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Original-URI $request_uri;
proxy_set_header Authorization "Bearer $auth_token";
proxy_set_header remote_user "$remote_user";
#proxy_set_header Authorization "Bearer $auth_token";
#proxy_set_header remote_user "$remote_user";
proxy_pass http://_inception-server;
}
@ -252,8 +267,8 @@ server {
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Original-URI $request_uri;
proxy_set_header Authorization "Bearer $auth_token";
proxy_set_header remote_user "$remote_user";
#proxy_set_header Authorization "Bearer $auth_token";
#proxy_set_header remote_user "$remote_user";
proxy_pass http://_inception-server;
}
@ -267,8 +282,8 @@ server {
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Original-URI $request_uri;
proxy_set_header Authorization "Bearer $auth_token";
proxy_set_header remote_user "$remote_user";
#proxy_set_header Authorization "Bearer $auth_token";
#proxy_set_header remote_user "$remote_user";
proxy_pass http://_inception-server;
}
@ -282,8 +297,8 @@ server {
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Original-URI $request_uri;
proxy_set_header Authorization "Bearer $auth_token";
proxy_set_header remote_user "$remote_user";
#proxy_set_header Authorization "Bearer $auth_token";
#proxy_set_header remote_user "$remote_user";
proxy_pass http://_inception-server;
}