mirror of
https://github.com/YunoHost-Apps/funkwhale_ynh.git
synced 2024-09-03 18:36:24 +02:00
61 lines
1.7 KiB
Nginx Configuration File
61 lines
1.7 KiB
Nginx Configuration File
|
|
location / {
|
|
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__/;
|
|
}
|
|
|
|
location /front/ {
|
|
alias __FINALPATH__/code/front/dist/;
|
|
expires 30d;
|
|
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";
|
|
}
|
|
|
|
location /front/embed.html {
|
|
more_set_headers X-Frame-Options "ALLOW";
|
|
alias __FINALPATH__/code/front/dist/embed.html;
|
|
}
|
|
|
|
location /federation/ {
|
|
include __FINALPATH__/code/deploy/funkwhale_proxy.conf;
|
|
proxy_pass http://127.0.0.1:__PORT__/federation/;
|
|
}
|
|
|
|
|
|
location /rest/ {
|
|
include __FINALPATH__/code/deploy/funkwhale_proxy.conf;
|
|
proxy_pass http://127.0.0.1:__PORT__/api/subsonic/rest/;
|
|
}
|
|
|
|
|
|
location /.well-known/ {
|
|
include __FINALPATH__/code/deploy/funkwhale_proxy.conf;
|
|
proxy_pass http://127.0.0.1:__PORT__/.well-known/;
|
|
}
|
|
|
|
location /media/ {
|
|
alias __FINALPATH__/media/;
|
|
}
|
|
|
|
location /_protected/media/ {
|
|
# 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/;
|
|
}
|
|
|
|
location /_protected/music/ {
|
|
internal;
|
|
alias __FINALPATH__/import/;
|
|
}
|
|
|
|
location /staticfiles/ {
|
|
# django static files
|
|
alias __FINALPATH__/code/data/static/;
|
|
}
|