mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-12-23 22:58:17 -05:00
Update backend/nginx.conf
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -39,15 +39,15 @@ http {
|
||||
internal;
|
||||
alias /code/media/;
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
# Nested location for PDFs
|
||||
location ~* \.pdf$ {
|
||||
add_header Content-Security-Policy "default-src 'self'; script-src 'none'; object-src 'none'; base-uri 'none'" always;
|
||||
add_header X-Content-Type-Options nosniff always;
|
||||
add_header X-Frame-Options SAMEORIGIN always;
|
||||
add_header Content-Disposition "inline" always;
|
||||
}
|
||||
}
|
||||
# Separate location for PDFs under /protectedMedia/
|
||||
location ~* ^/protectedMedia/.*\.pdf$ {
|
||||
add_header Content-Security-Policy "default-src 'self'; script-src 'none'; object-src 'none'; base-uri 'none'" always;
|
||||
add_header X-Content-Type-Options nosniff always;
|
||||
add_header X-Frame-Options SAMEORIGIN always;
|
||||
add_header Content-Disposition "inline" always;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user