# BAA: scoped WordPress upload/code hardening. Do not include outside this site's server block. location ^~ /wp-content/uploads/ { autoindex off; location ~ (^|/)\. { return 404; } location ~* \.(php[0-9]*|phtml|phar)(/|$) { return 403; } add_header Strict-Transport-Security "max-age=15768000" always; add_header X-Content-Type-Options "nosniff" always; add_header X-Frame-Options "SAMEORIGIN" always; add_header Referrer-Policy "strict-origin-when-cross-origin" always; add_header Permissions-Policy "camera=(), microphone=(), geolocation=(), clipboard-write=(self)" always; location ^~ /wp-content/uploads/baa-code/ { autoindex off; location ~ (^|/)\. { return 404; } location ~* \.(php[0-9]*|phtml|phar)(/|$) { return 403; } add_header Strict-Transport-Security "max-age=15768000" always; add_header X-Content-Type-Options "nosniff" always; add_header X-Frame-Options "SAMEORIGIN" always; add_header Referrer-Policy "strict-origin-when-cross-origin" always; add_header Permissions-Policy "camera=(), microphone=(), geolocation=(), clipboard-write=(self)" always; add_header Content-Security-Policy "default-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; connect-src 'self'; img-src 'self'; font-src 'self'; object-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'self'" always; try_files $uri $uri/ =404; } try_files $uri $uri/ =404; } location ^~ /wp-content/uploads-webpc/ { autoindex off; location ~ (^|/)\. { return 404; } location ~* \.(php[0-9]*|phtml|phar)(/|$) { return 403; } add_header Strict-Transport-Security "max-age=15768000" always; add_header X-Content-Type-Options "nosniff" always; add_header X-Frame-Options "SAMEORIGIN" always; add_header Referrer-Policy "strict-origin-when-cross-origin" always; try_files $uri $uri/ =404; }