frontend: don't use path to give team's ID, use a dedicated header
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
f4dcaa23a3
commit
0d792dcd8f
5 changed files with 53 additions and 60 deletions
|
|
@ -180,55 +180,49 @@ server {
|
|||
location /submit/ {
|
||||
include fic-auth.conf;
|
||||
|
||||
rewrite ^/submit/(.*)$ /submission/$team/$1 break;
|
||||
|
||||
proxy_pass http://frontend:8080/;
|
||||
proxy_pass http://frontend:8080/submission;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-FIC-Team $team;
|
||||
proxy_redirect off;
|
||||
}
|
||||
location /submit/issue {
|
||||
include fic-auth.conf;
|
||||
|
||||
rewrite ^/submit/.*$ /issue/$team break;
|
||||
|
||||
proxy_pass http://frontend:8080/;
|
||||
proxy_pass http://frontend:8080/issue;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-FIC-Team $team;
|
||||
proxy_redirect off;
|
||||
}
|
||||
location /submit/name {
|
||||
include fic-auth.conf;
|
||||
|
||||
rewrite ^/submit/.*$ /chname/$team break;
|
||||
|
||||
proxy_pass http://frontend:8080/;
|
||||
proxy_pass http://frontend:8080/chname;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-FIC-Team $team;
|
||||
proxy_redirect off;
|
||||
}
|
||||
location /registration {
|
||||
include fic-auth.conf;
|
||||
|
||||
rewrite ^/registration /registration/$team break;
|
||||
|
||||
proxy_pass http://frontend:8080;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-FIC-Team $team;
|
||||
proxy_redirect off;
|
||||
}
|
||||
location /openhint/ {
|
||||
include fic-auth.conf;
|
||||
|
||||
rewrite ^/openhint/(.*)$ /openhint/$team/$1 break;
|
||||
|
||||
proxy_pass http://frontend:8080/;
|
||||
proxy_pass http://frontend:8080;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-FIC-Team $team;
|
||||
proxy_redirect off;
|
||||
}
|
||||
location /wantchoices/ {
|
||||
include fic-auth.conf;
|
||||
|
||||
rewrite ^/wantchoices/(.*)$ /wantchoices/$team/$1 break;
|
||||
|
||||
proxy_pass http://frontend:8080/;
|
||||
proxy_pass http://frontend:8080;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-FIC-Team $team;
|
||||
proxy_redirect off;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -172,55 +172,49 @@ server {
|
|||
location /submit/ {
|
||||
include fic-auth.conf;
|
||||
|
||||
rewrite ^/submit/(.*)$ /submission/$team/$1 break;
|
||||
|
||||
proxy_pass http://frontend:8080/;
|
||||
proxy_pass http://frontend:8080/submission;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-FIC-Team $team;
|
||||
proxy_redirect off;
|
||||
}
|
||||
location /submit/issue {
|
||||
include fic-auth.conf;
|
||||
|
||||
rewrite ^/submit/.*$ /issue/$team break;
|
||||
|
||||
proxy_pass http://frontend:8080/;
|
||||
proxy_pass http://frontend:8080/issue;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-FIC-Team $team;
|
||||
proxy_redirect off;
|
||||
}
|
||||
location /submit/name {
|
||||
include fic-auth.conf;
|
||||
|
||||
rewrite ^/submit/.*$ /chname/$team break;
|
||||
|
||||
proxy_pass http://frontend:8080/;
|
||||
proxy_pass http://frontend:8080/chname;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-FIC-Team $team;
|
||||
proxy_redirect off;
|
||||
}
|
||||
location /registration {
|
||||
include fic-auth.conf;
|
||||
|
||||
rewrite ^/registration /registration/$team break;
|
||||
|
||||
proxy_pass http://frontend:8080;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-FIC-Team $team;
|
||||
proxy_redirect off;
|
||||
}
|
||||
location /openhint/ {
|
||||
include fic-auth.conf;
|
||||
|
||||
rewrite ^/openhint/(.*)$ /openhint/$team/$1 break;
|
||||
|
||||
proxy_pass http://frontend:8080/;
|
||||
proxy_pass http://frontend:8080;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-FIC-Team $team;
|
||||
proxy_redirect off;
|
||||
}
|
||||
location /wantchoices/ {
|
||||
include fic-auth.conf;
|
||||
|
||||
rewrite ^/wantchoices/(.*)$ /wantchoices/$team/$1 break;
|
||||
|
||||
proxy_pass http://frontend:8080/;
|
||||
proxy_pass http://frontend:8080;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-FIC-Team $team;
|
||||
proxy_redirect off;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue