blob: e4ca580b2d1c17bb5a3115a91aa90015a035140d [file] [log] [blame]
Nico Huber61433f32023-07-25 17:09:14 +00001server {
2 listen 443 ssl;
3 listen [::]:443 ssl;
4
Nico Huber2a128892023-07-25 17:19:42 +00005 server_name id.${SA_PUBLIC_DOMAIN_NAME};
Nico Huber61433f32023-07-25 17:09:14 +00006
7 location /auth/ { # Gerrit adds this prefix for Keycloak...
8 rewrite ^/auth(.*)$ $1 last;
9 }
10
Nico Hubera547f282023-07-25 23:04:35 +000011 location = / { # For convenience, redirect to account console.
12 rewrite ^.*$ /realms/sourcearcade/account last;
13 }
14
15 location ~ ^/(?:realms|resources|js)/ {
Nico Huber61433f32023-07-25 17:09:14 +000016 proxy_pass http://keycloak:8080;
17 proxy_set_header X-Forwarded-For $remote_addr;
18 proxy_set_header Host $host;
19 }
Nico Hubera547f282023-07-25 23:04:35 +000020
21 location / {
22 return 403;
23 }
Nico Huber61433f32023-07-25 17:09:14 +000024}