1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/invidious_ynh.git synced 2024-09-03 19:15:55 +02:00

Make /embed/ links work properly (#8)

Gives them the right headers and redirects them to the right place
This commit is contained in:
Georgelemental 2021-02-16 14:03:56 -05:00 committed by GitHub
parent e879a763f6
commit 32fb4a27b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,5 +22,21 @@ location __PATH__/ {
} }
location __PATH__/embed/ { location __PATH__/embed/ {
# Force usage of https
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
proxy_pass http://127.0.0.1:3000/embed/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
more_set_headers "X-Frame-Options : ALLOWALL"; more_set_headers "X-Frame-Options : ALLOWALL";
} }