mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Implemented not working oauth2-proxy draft
This commit is contained in:
@@ -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' %}
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user