1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/funkwhale_ynh.git synced 2024-09-03 18:36:24 +02:00
funkwhale_ynh/conf/nginx.conf

68 lines
2.2 KiB
Nginx Configuration File
Raw Normal View History

2019-02-15 06:46:40 +01:00
location / {
2020-05-18 21:35:14 +02:00
include __FINALPATH__/code/deploy/funkwhale_proxy.conf;
# this is needed if you have file import via upload enabled
client_max_body_size 100M;
proxy_pass http://127.0.0.1:__PORT__/;
}
2019-01-26 20:00:47 +01:00
location /front/ {
2020-05-18 21:35:14 +02:00
alias __FINALPATH__/code/front/dist/;
2020-05-18 21:51:35 +02:00
expires 30d;
2020-05-18 21:35:14 +02:00
more_set_headers "Pragma: public";
more_set_headers "Cache-Control: public, must-revalidate, proxy-revalidate";
more_set_headers "Content-Security-Policy: default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:; object-src 'none'; media-src 'self' data:";
more_set_headers "Referrer-Policy: strict-origin-when-cross-origin";
more_set_headers "X-Frame-Options: SAMEORIGIN";
2020-05-18 21:52:07 +02:00
more_set_headers "Service-Worker-Allowed: /";
2020-05-17 20:39:11 +02:00
2019-10-31 18:25:28 +01:00
}
location /front/embed.html {
2020-05-18 21:51:35 +02:00
more_set_headers "Content-Security-Policy: default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:; object-src 'none'; media-src 'self' data:";
2020-05-18 21:35:14 +02:00
more_set_headers "Referrer-Policy: strict-origin-when-cross-origin";
2020-05-18 21:51:35 +02:00
more_set_headers "X-Frame-Options: ALLOW";
2020-05-18 21:35:14 +02:00
more_set_headers "Pragma: public";
more_set_headers "Cache-Control: public, must-revalidate, proxy-revalidate";
2020-05-18 21:51:35 +02:00
alias __FINALPATH__/code/front/dist/embed.html;
expires 30d;
}
location /federation/ {
2020-05-18 21:51:35 +02:00
include __FINALPATH__/code/deploy/funkwhale_proxy.conf;
proxy_pass http://127.0.0.1:__PORT__/federation/;
}
2019-02-15 06:46:40 +01:00
location /rest/ {
2020-05-18 21:51:35 +02:00
include __FINALPATH__/code/deploy/funkwhale_proxy.conf;
proxy_pass http://127.0.0.1:__PORT__/api/subsonic/rest/;
2019-02-15 06:46:40 +01:00
}
2018-05-10 18:54:23 +02:00
location /.well-known/ {
2020-05-18 21:51:35 +02:00
include __FINALPATH__/code/deploy/funkwhale_proxy.conf;
proxy_pass http://127.0.0.1:__PORT__/.well-known/;
}
location /media/ {
2020-05-18 21:51:35 +02:00
alias __FINALPATH__/media/;
}
2019-02-15 06:46:40 +01:00
location /_protected/media/ {
2020-05-18 21:51:35 +02:00
# this is an internal location that is used to serve
# audio files once correct permission / authentication
# has been checked on API side
internal;
alias __FINALPATH__/media/;
}
2019-02-15 06:46:40 +01:00
location /_protected/music/ {
2020-05-18 21:51:35 +02:00
internal;
alias __FINALPATH__/import/;
}
location /staticfiles/ {
2020-05-18 21:51:35 +02:00
# django static files
alias __FINALPATH__/code/data/static/;
2019-08-28 23:50:20 +02:00
}