Solved peertube bugs

This commit is contained in:
Kevin Veen-Birkenbach 2025-07-26 08:08:51 +02:00
parent 996244b672
commit f9f76892af
No known key found for this signature in database
GPG Key ID: 44D8F11FD62F878E
4 changed files with 12 additions and 8 deletions

View File

@ -1,10 +1,12 @@
location {{location | default("/")}}
{% set location = location | default("/")%}
location {{location}}
{
{% if oauth2_proxy_enabled | default(false) | bool %}
{% include 'roles/web-app-oauth2-proxy/templates/following_directives.conf.j2'%}
{% endif %}
proxy_pass http://127.0.0.1:{{ http_port }}{{ location | default("/") }};
proxy_pass http://127.0.0.1:{{ http_port }}{{ location if not location.startswith('@') else '' }};
# headers
proxy_set_header Host $host;

View File

@ -2,8 +2,8 @@ location {{ location_ws }} {
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 https;
proxy_pass http://127.0.0.1:{{ ws_port }};
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:{{ ws_port }};
# Proxy buffering needs to be disabled for websockets.
proxy_buffering off;

View File

@ -9,7 +9,9 @@
loop_control:
loop_var: domain
vars:
http: "{{ ports.localhost.http[application_id] }}"
# Websockt and http listen to the same port
http_port: "{{ ports.localhost.http[application_id] }}"
ws_port: "{{ ports.localhost.http[application_id] }}"
- name: "Install and activate auth-openid-connect plugin if OIDC is enabled"
include_tasks: enable-oidc.yml

View File

@ -9,9 +9,9 @@ location = /logout {
# CORS headers allow your central page to call this
add_header 'Access-Control-Allow-Origin' '{{ domains | get_url('web-svc-logout', web_protocol) }}' always;
add_header 'Access-Control-Allow-Credentials' 'true' always;
add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'Accept, Authorization' always;
add_header 'Access-Control-Allow-Credentials' 'true' always;
add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'Accept, Authorization' always;
# Disable caching absolutely
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0" always;