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:
parent
e879a763f6
commit
32fb4a27b7
1 changed files with 16 additions and 0 deletions
|
@ -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";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue