mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-19 04:49:37 +02:00
Update backend/nginx.conf
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
787ac4a8b3
commit
9d69935f22
1 changed files with 8 additions and 8 deletions
|
@ -39,15 +39,15 @@ http {
|
|||
internal;
|
||||
alias /code/media/;
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
# Nested location for PDFs
|
||||
location ~* \.pdf$ {
|
||||
# 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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue