mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-12-08 18:35:11 +00:00
26 lines
1.1 KiB
Django/Jinja
26 lines
1.1 KiB
Django/Jinja
location = /logout {
|
||
{# Proxy to the logout service #}
|
||
proxy_pass http://127.0.0.1:{{ ports.localhost.http['web-svc-logout'] }}/logout;
|
||
proxy_set_header Host $host;
|
||
proxy_set_header X-Real-IP $remote_addr;
|
||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||
proxy_set_header X-Forwarded-Proto $scheme;
|
||
proxy_http_version 1.1;
|
||
|
||
{# CORS headers – allow your central page to call this #}
|
||
{%- set aca_origin = domains | get_url('web-svc-logout', WEB_PROTOCOL) -%}
|
||
{%- set aca_credentials = "'true' always" -%}
|
||
{%- set aca_methods = "'GET, OPTIONS' always" -%}
|
||
{%- set aca_headers = "'Accept, Authorization' always" -%}
|
||
{%- include 'roles/sys-svc-proxy/templates/headers/access_control_allow.conf.j2' -%}
|
||
|
||
{# Disable caching absolutely #}
|
||
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0" always;
|
||
add_header Pragma "no-cache" always;
|
||
add_header Expires "0" always;
|
||
|
||
{# Handle preflight #}
|
||
if ($request_method = OPTIONS) {
|
||
return 204;
|
||
}
|
||
} |