Skip to content

Commit 0de6951

Browse files
committed
Add media location handling in Nginx configuration
1 parent 5242528 commit 0de6951

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ services:
6767
volumes:
6868
- ./nginx.conf:/etc/nginx/nginx.conf:ro
6969
- ./ssl:/etc/nginx/ssl:ro
70+
- admin-media:/media:ro
7071
depends_on:
7172
- os2borgerpc-admin
7273
volumes:

example.nginx.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ http {
1919
ssl_certificate /etc/nginx/ssl/nginx.crt;
2020
ssl_certificate_key /etc/nginx/ssl/nginx.key;
2121

22+
location /media/ {
23+
alias /media/;
24+
expires -1;
25+
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
26+
}
27+
2228
location / {
2329
proxy_pass http://os2borgerpc-admin:9999;
2430
proxy_set_header Host $host;

0 commit comments

Comments
 (0)