This commit is contained in:
wrj97 2026-08-27 15:16:52 +08:00 committed by GitHub
commit 739dc88665
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View file

@ -45,11 +45,11 @@ import org.springframework.security.web.util.matcher.RequestMatcher;
public class SecurityConfig {
private static final String CONTENT_SECURITY_POLICY = String.join("; ",
"default-src 'self'",
"script-src 'self' 'unsafe-inline' 'unsafe-eval'",
"script-src 'self'",
"style-src 'self' 'unsafe-inline' https://fonts.googleapis.com",
"img-src 'self' data: blob: https:",
"font-src 'self' data: https://fonts.gstatic.com",
"connect-src 'self' ws: wss: http://localhost:* https://localhost:*",
"connect-src 'self'",
"object-src 'none'",
"base-uri 'self'",
"frame-ancestors 'none'",

View file

@ -1,3 +1,4 @@
server_tokens off;
server {
listen 80;
server_name _;