mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-10-09 18:28:10 +02:00
- Add reusable Nginx include: roles/sys-svc-proxy/templates/headers/access_control_allow.conf.j2 (dynamic ACAO/credentials/methods/headers via role vars) - Set global 'Vary: Origin' in nginx.conf.j2 to prevent cache poisoning - CSP: allow Simple Icons via connect-src when feature is enabled - Front proxy: rename vars to lowercase + flush handlers after config deploy - Desktop: gate & load Simple Icons role; inject brand logos when enabled - Bluesky + Logout: replace inline CORS with centralized include - Simpleicons: public CORS (ACAO='*', no credentials), keep GET/OPTIONS, allow headers - Taiga: adjust canonical domain to taiga.kanban.{{ PRIMARY_DOMAIN }} - LibreTranslate: remove unused images/versions keys Fixes: https://open.project.infinito.nexus/projects/cymais/work_packages/342/activity Discussion: https://chatgpt.com/share/68da5e27-ffd4-800f-91a3-0ef103058d44
26 lines
865 B
Django/Jinja
26 lines
865 B
Django/Jinja
# Configure CORS headers dynamically based on role variables.
|
|
# If no variable is defined, defaults are applied (e.g. same-origin).
|
|
# Discussion: https://chat.openai.com/share/2671b961-c1b0-472d-bae2-2804d0455e8a
|
|
|
|
{# Access-Control-Allow-Origin #}
|
|
{% if aca_origin is defined %}
|
|
add_header 'Access-Control-Allow-Origin' {{ aca_origin }};
|
|
{% else %}
|
|
add_header 'Access-Control-Allow-Origin' $scheme://$host always;
|
|
{% endif %}
|
|
|
|
{# Access-Control-Allow-Credentials #}
|
|
{% if aca_credentials is defined %}
|
|
add_header 'Access-Control-Allow-Credentials' {{ aca_credentials }};
|
|
{% endif %}
|
|
|
|
{# Access-Control-Allow-Methods #}
|
|
{% if aca_methods is defined %}
|
|
add_header 'Access-Control-Allow-Methods' {{ aca_methods }};
|
|
{% endif %}
|
|
|
|
{# Access-Control-Allow-Headers #}
|
|
{% if aca_headers is defined %}
|
|
add_header 'Access-Control-Allow-Headers' {{ aca_headers }};
|
|
{% endif %}
|