fix: Make sure the old embed URLs are still working

Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2489>
This commit is contained in:
Georg Krause 2023-06-16 16:09:32 +02:00 committed by Marge
parent 099b7fdd61
commit 71ed2aecb1
4 changed files with 5 additions and 4 deletions

View File

@ -0,0 +1 @@
Make sure embed codes generated before 1.3.0 are still working

View File

@ -96,7 +96,7 @@ server {
try_files $uri $uri/ /index.html;
}
location = /embed.html {
location ~ "/(front/)?embed.html" {
add_header Content-Security-Policy "connect-src https: http: 'self'; default-src 'self'; script-src 'self' unpkg.com 'unsafe-inline' 'unsafe-eval'; style-src https: http: 'self' 'unsafe-inline'; img-src https: http: 'self' data:; font-src https: http: 'self' data:; object-src 'none'; media-src https: http: 'self' data:";
add_header Referrer-Policy "strict-origin-when-cross-origin";

View File

@ -88,11 +88,11 @@ http {
expires 1d;
}
location = /embed.html {
location ~ "/(front/)?embed.html" {
add_header Content-Security-Policy "connect-src https: http: 'self'; default-src 'self'; script-src 'self' unpkg.com 'unsafe-inline' 'unsafe-eval'; style-src https: http: 'self' 'unsafe-inline'; img-src https: http: 'self' data:; font-src https: http: 'self' data:; object-src 'none'; media-src https: http: 'self' data:";
add_header Referrer-Policy "strict-origin-when-cross-origin";
proxy_pass http://funkwhale-front;
proxy_pass http://funkwhale-front/embed.html;
expires 1d;
}

View File

@ -61,7 +61,7 @@ server {
try_files $uri $uri/ /index.html;
}
location = /embed.html {
location ~ "/(front/)?embed.html" {
add_header Content-Security-Policy "connect-src https: http: 'self'; default-src 'self'; script-src 'self' unpkg.com 'unsafe-inline' 'unsafe-eval'; style-src https: http: 'self' 'unsafe-inline'; img-src https: http: 'self' data:; font-src https: http: 'self' data:; object-src 'none'; media-src https: http: 'self' data:";
add_header Referrer-Policy "strict-origin-when-cross-origin";