diff --git a/roles/docker-oauth2-proxy/templates/following_directives.conf.j2 b/roles/docker-oauth2-proxy/templates/following_directives.conf.j2 index ec672283..f8f0fa86 100644 --- a/roles/docker-oauth2-proxy/templates/following_directives.conf.j2 +++ b/roles/docker-oauth2-proxy/templates/following_directives.conf.j2 @@ -1,9 +1,9 @@ -# The following directives enforce OAuth2 authentication: +{# The following directives enforce OAuth2 authentication: #} auth_request /oauth2/auth; -# This directive issues an internal sub-request to '/oauth2/auth' for every incoming request. -# The sub-request checks if the client is authenticated. +{# This directive issues an internal sub-request to '/oauth2/auth' for every incoming request. #} +{# The sub-request checks if the client is authenticated. #} error_page 401 = /oauth2/start; -# If the authentication check fails (i.e., a 401 Unauthorized is returned), -# this directive redirects the client to '/oauth2/start', which typically initiates the OAuth2 login process. \ No newline at end of file +{# If the authentication check fails (i.e., a 401 Unauthorized is returned), #} +{# this directive redirects the client to '/oauth2/start', which typically initiates the OAuth2 login process. #} \ No newline at end of file diff --git a/roles/nginx-docker-reverse-proxy/templates/proxy_pass.conf.j2 b/roles/nginx-docker-reverse-proxy/templates/proxy_pass.conf.j2 index 5267d748..7438a3bc 100644 --- a/roles/nginx-docker-reverse-proxy/templates/proxy_pass.conf.j2 +++ b/roles/nginx-docker-reverse-proxy/templates/proxy_pass.conf.j2 @@ -4,7 +4,7 @@ location {{location | default("/")}} {% include 'roles/docker-oauth2-proxy/templates/following_directives.conf.j2'%} {% endif %} - proxy_pass http://127.0.0.1:{{http_port}}/; + proxy_pass http://127.0.0.1:{{http_port}}{{location | default("/")}}; # headers proxy_set_header Host $host;