Update to add for videos
This commit is contained in:
parent
0823a15744
commit
33a2488869
1 changed files with 12 additions and 2 deletions
14
nginx.conf
14
nginx.conf
|
|
@ -9,7 +9,7 @@ server {
|
|||
add_header X-XSS-Protection "1; mode=block";
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
add_header Strict-Transport-Security "max-age=31536000";
|
||||
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://unpkg.com; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' data:;";
|
||||
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://unpkg.com; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' data:; media-src 'self';";
|
||||
|
||||
# Compression
|
||||
gzip on;
|
||||
|
|
@ -21,8 +21,18 @@ server {
|
|||
add_header Cache-Control "public, no-transform";
|
||||
}
|
||||
|
||||
# Video files handling
|
||||
location /videos/ {
|
||||
alias /usr/share/nginx/html/videos/;
|
||||
add_header Cache-Control "public, no-transform";
|
||||
types {
|
||||
video/mp4 mp4;
|
||||
}
|
||||
add_header Accept-Ranges bytes;
|
||||
}
|
||||
|
||||
# Static asset caching
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|vtt|txt)$ {
|
||||
expires 30d;
|
||||
add_header Cache-Control "public, no-transform";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue