fix(nginx): expose only subdirectories of /media
This commit is contained in:
parent
5dcaf4a166
commit
817a710c2e
4 changed files with 28 additions and 6 deletions
|
|
@ -85,8 +85,15 @@ server {
|
|||
proxy_pass http://funkwhale-api;
|
||||
}
|
||||
|
||||
location /media/ {
|
||||
alias ${MEDIA_ROOT}/;
|
||||
# Allow direct access to only specific subdirectories in /media
|
||||
location /media/__sized__/ {
|
||||
alias ${MEDIA_ROOT}/__sized__/;
|
||||
add_header Access-Control-Allow-Origin '*';
|
||||
}
|
||||
|
||||
# Allow direct access to only specific subdirectories in /media
|
||||
location /media/attachments/ {
|
||||
alias ${MEDIA_ROOT}/attachments/;
|
||||
add_header Access-Control-Allow-Origin '*';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue