Nico Huber | 61433f3 | 2023-07-25 17:09:14 +0000 | [diff] [blame] | 1 | server { |
| 2 | listen 443 ssl; |
| 3 | listen [::]:443 ssl; |
| 4 | |
Nico Huber | 2a12889 | 2023-07-25 17:19:42 +0000 | [diff] [blame] | 5 | server_name id.${SA_PUBLIC_DOMAIN_NAME}; |
Nico Huber | 61433f3 | 2023-07-25 17:09:14 +0000 | [diff] [blame] | 6 | |
| 7 | location /auth/ { # Gerrit adds this prefix for Keycloak... |
| 8 | rewrite ^/auth(.*)$ $1 last; |
| 9 | } |
| 10 | |
Nico Huber | a547f28 | 2023-07-25 23:04:35 +0000 | [diff] [blame^] | 11 | location = / { # For convenience, redirect to account console. |
| 12 | rewrite ^.*$ /realms/sourcearcade/account last; |
| 13 | } |
| 14 | |
| 15 | location ~ ^/(?:realms|resources|js)/ { |
Nico Huber | 61433f3 | 2023-07-25 17:09:14 +0000 | [diff] [blame] | 16 | proxy_pass http://keycloak:8080; |
| 17 | proxy_set_header X-Forwarded-For $remote_addr; |
| 18 | proxy_set_header Host $host; |
| 19 | } |
Nico Huber | a547f28 | 2023-07-25 23:04:35 +0000 | [diff] [blame^] | 20 | |
| 21 | location / { |
| 22 | return 403; |
| 23 | } |
Nico Huber | 61433f3 | 2023-07-25 17:09:14 +0000 | [diff] [blame] | 24 | } |