mirror of
https://github.com/pterodactyl/panel.git
synced 2026-12-03 12:55:41 -05:00
nginx tweaks
This commit is contained in:
@@ -31,9 +31,8 @@ server {
|
||||
}
|
||||
|
||||
# Extension files are third-party content on the panel's origin. The sandbox stops a
|
||||
# file opened directly (an SVG, say) from running script as the panel; scripts the
|
||||
# panel imports are unaffected. ^~ skips the regex locations above, so dotfiles are
|
||||
# denied again here.
|
||||
# file opened directly (an SVG, say) from running script as the panel. ^~ skips the
|
||||
# regex locations above, so dotfiles are denied again here.
|
||||
location ^~ /assets/extensions/ {
|
||||
add_header Content-Security-Policy "sandbox" always;
|
||||
add_header X-Content-Type-Options nosniff always;
|
||||
@@ -42,6 +41,13 @@ server {
|
||||
deny all;
|
||||
}
|
||||
|
||||
# A sandbox policy would stop these from starting as workers, and a script never
|
||||
# renders as a page, so it only needs nosniff.
|
||||
location ~ \.m?js$ {
|
||||
add_header X-Content-Type-Options nosniff always;
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user