2020-12-24 14:27:31 +01:00
|
|
|
server
|
|
|
|
{
|
|
|
|
server_name {{domain}};
|
|
|
|
|
2025-02-19 05:53:00 +01:00
|
|
|
{% if applications[application_id].oauth2_proxy.enabled | default(false) | bool %}
|
2025-02-19 03:58:21 +01:00
|
|
|
{% include 'roles/docker-oauth2-proxy/templates/endpoint.conf.j2'%}
|
2025-01-26 13:25:39 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2025-02-19 02:00:41 +01:00
|
|
|
{% include 'roles/nginx-modifier-all/templates/global.includes.conf.j2'%}
|
2025-02-07 13:39:46 +01:00
|
|
|
|
2023-12-07 18:54:47 +01:00
|
|
|
{% if nginx_docker_reverse_proxy_extra_configuration is defined %}
|
2025-02-19 05:53:00 +01:00
|
|
|
{# Additional Domain Specific Configuration #}
|
2023-12-07 18:54:47 +01:00
|
|
|
{{nginx_docker_reverse_proxy_extra_configuration}}
|
2020-12-24 14:27:31 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2023-09-02 13:13:28 +02:00
|
|
|
{% include 'roles/letsencrypt/templates/ssl_header.j2' %}
|
2020-12-24 14:27:31 +01:00
|
|
|
|
2025-02-19 05:53:00 +01:00
|
|
|
{% if applications[application_id].oauth2_proxy.enabled | default(false) %}
|
|
|
|
{% if applications[application_id].oauth2_proxy.location is defined %}
|
|
|
|
{# Exposed and Unprotected Location #}
|
|
|
|
{% include 'proxy_pass.conf.j2' %}
|
|
|
|
{% set oauth2_proxy_enabled = true %}
|
|
|
|
{% set location = applications[application_id].oauth2_proxy.location %}
|
|
|
|
{# Gated Location by OAuth2 Proxy #}
|
|
|
|
{% include 'proxy_pass.conf.j2' %}
|
|
|
|
{% else %}
|
|
|
|
{% set oauth2_proxy_enabled = true %}
|
|
|
|
{# Protected Domain by OAuth2 Proxy #}
|
|
|
|
{% include 'proxy_pass.conf.j2'%}
|
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
{# Exposed Domain - Not protected by OAuth2 Proxy #}
|
|
|
|
{% include 'proxy_pass.conf.j2' %}
|
|
|
|
{% endif %}
|
2020-12-24 14:27:31 +01:00
|
|
|
}
|