tubearchivist/docker_assets/nginx.conf

70 lines
1.4 KiB
Nginx Configuration File

server {
listen 8000;
location /cache/videos/ {
auth_request /api/ping/;
alias /cache/videos/;
}
location /cache/channels/ {
auth_request /api/ping/;
alias /cache/channels/;
}
location /cache/playlists/ {
auth_request /api/ping/;
alias /cache/playlists/;
}
location /media/ {
auth_request /api/ping/;
alias /youtube/;
types {
text/vtt vtt;
}
}
location /youtube/ {
auth_request /api/ping/;
alias /youtube/;
types {
video/mp4 mp4;
}
}
location /api {
include proxy_params;
proxy_pass http://localhost:8080;
}
location /admin {
include proxy_params;
proxy_pass http://localhost:8080;
}
location /static/ {
alias /app/staticfiles/;
}
root /app/static;
index index.html;
location ~* ^/(?!static/|cache/).*\.(?:css|js|png|jpg|jpeg|gif|ico|svg|woff2?)$ {
try_files $uri $uri/ /index.html =404;
}
location = /index.html {
add_header Cache-Control "no-store, no-cache, must-revalidate";
add_header Pragma "no-cache";
expires 0;
}
location / {
add_header Cache-Control "no-store, no-cache, must-revalidate";
add_header Pragma "no-cache";
expires 0;
try_files $uri $uri/ /index.html =404;
}
}