Skip to content

Commit a99bce7

Browse files
committed
CSP: adjust configuration to fix errors on /series/{id} page.
Addressed to #226
1 parent 5fa7554 commit a99bce7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/ru/mystamps/web/support/spring/security/SecurityConfig.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,10 @@ protected void configure(HttpSecurity http) throws Exception {
131131
// https://github.com/jquery/jquery/blob/d71f6a53927ad02d/jquery.js#L1441-L1447
132132
// and https://w3c.github.io/webappsec-csp/#unsafe-hashed-attributes-usage)
133133
+ "script-src 'self' 'unsafe-inline'; "
134+
// 'self' is required for: uploaded images and its previews
134135
// 'https://cdn.rawgit.com' is required for: languages.png (TODO: GH #246)
135136
// 'https://raw.githubusercontent.com' is required for: languages.png
136-
+ "img-src https://cdn.rawgit.com https://raw.githubusercontent.com; "
137+
+ "img-src 'self' https://cdn.rawgit.com https://raw.githubusercontent.com; "
137138
// 'self' is required for: glyphicons-halflings-regular.woff2 from bootstrap
138139
+ "font-src 'self'"
139140
).reportOnly();

0 commit comments

Comments
 (0)