File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed
src/main/java/ru/mystamps/web/support/spring/security Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -157,16 +157,6 @@ class ContentSecurityPolicyHeaderWriter implements HeaderWriter {
157
157
158
158
private static final char SEPARATOR = ';' ;
159
159
160
- private static final int MIN_HEADER_LENGTH =
161
- DEFAULT_SRC .length ()
162
- + IMG_SRC .length ()
163
- + FONT_SRC .length ()
164
- + REPORT_URI .length ()
165
- + STYLE_SRC .length ()
166
- + SCRIPT_SRC .length ()
167
- // number of separators between directives
168
- + 5 ;
169
-
170
160
private final boolean useCdn ;
171
161
private final boolean useSingleHost ;
172
162
private final boolean hasH2Console ;
@@ -184,7 +174,7 @@ protected String constructDirectives(String uri) {
184
174
boolean onAddSeriesPage = uri .equals (SeriesUrl .ADD_SERIES_PAGE );
185
175
boolean onH2ConsolePage = hasH2Console && uri .startsWith (H2_CONSOLE_PATTERN );
186
176
187
- StringBuilder sb = new StringBuilder (MIN_HEADER_LENGTH );
177
+ StringBuilder sb = new StringBuilder ();
188
178
189
179
sb .append (DEFAULT_SRC ).append (SEPARATOR )
190
180
.append (IMG_SRC ).append (useSingleHost ? IMG_SRC_SELF : IMG_SRC_ALT ).append (SEPARATOR )
You can’t perform that action at this time.
0 commit comments