Implemented not working oauth2-proxy draft

This commit is contained in:
2025-01-26 13:25:39 +01:00
parent e6292663b4
commit 7b9959af21
8 changed files with 61 additions and 13 deletions

View File

@@ -2,6 +2,18 @@ server
{
server_name {{domain}};
# Include OAuth2 Proxy
{% if oauth2_proxy_active | bool %}
# OAuth2-Proxy-Endpunkte
location /oauth2/ {
proxy_pass http://127.0.0.1:{{oauth2_proxy_port}};
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;
}
{% endif %}
# Include Matomo Tracking Code
{% if nginx_matomo_tracking | bool %}
{% include 'roles/nginx-matomo-tracking/templates/matomo-tracking.conf.j2' %}

View File

@@ -1,5 +1,10 @@
location /
{
{% if oauth2_proxy_active | bool %}
auth_request /oauth2/auth;
error_page 401 = /oauth2/start;
{% endif %}
proxy_pass http://127.0.0.1:{{http_port}}/;
# headers