Fix the oauth2-proxy role, add to playbook
This commit is contained in:
parent
4b7bbe556f
commit
dc660ed957
|
@ -3,3 +3,4 @@
|
||||||
roles:
|
roles:
|
||||||
- nginx
|
- nginx
|
||||||
- jellyfin
|
- jellyfin
|
||||||
|
- oauth2proxy
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
networks:
|
networks:
|
||||||
- name: bridge
|
- name: bridge
|
||||||
- name: nginx-internal
|
- name: nginx-internal
|
||||||
command: '/bin/oauth2-proxy --config=/etc/oauth-proxy.cfg'
|
command: '/bin/oauth2-proxy --config=/etc/oauth2-proxy.cfg'
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ data_folder }}/oauth2-proxy/oauth-proxy.cfg:/etc/oauth-proxy.cfg"
|
- "{{ data_folder }}/oauth2-proxy/oauth2-proxy.cfg:/etc/oauth2-proxy.cfg"
|
||||||
ports:
|
ports:
|
||||||
- "4180:4180"
|
- "4180:4180"
|
||||||
- name: copy oauth2-proxy nginx config
|
- name: copy oauth2-proxy nginx config
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
server {
|
server {
|
||||||
listen 443 default ssl;
|
listen 443 default ssl;
|
||||||
server_name auth.dev.local;
|
server_name "auth.{{ base_domain }}";
|
||||||
add_header Strict-Transport-Security max-age=2592000;
|
add_header Strict-Transport-Security max-age=2592000;
|
||||||
|
set $oauth2proxy oauth2-proxy;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://127.0.0.1:4180;
|
proxy_pass http://$oauth2proxy:4180;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Scheme $scheme;
|
proxy_set_header X-Scheme $scheme;
|
||||||
|
|
Loading…
Reference in New Issue