File tree 1 file changed +3
-4
lines changed
src/main/java/ru/mystamps/web/support/spring/security
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -101,12 +101,11 @@ class ContentSecurityPolicyHeaderWriter implements HeaderWriter {
101
101
102
102
@ Override
103
103
public void writeHeaders (HttpServletRequest request , HttpServletResponse response ) {
104
- response .setHeader ("Content-Security-Policy-Report-Only" , constructDirectives (request ));
104
+ String uri = request .getRequestURI ();
105
+ response .setHeader ("Content-Security-Policy-Report-Only" , constructDirectives (uri ));
105
106
}
106
107
107
- private static String constructDirectives (HttpServletRequest request ) {
108
- String uri = request .getRequestURI ();
109
-
108
+ private static String constructDirectives (String uri ) {
110
109
boolean onCollectionInfoPage = uri .startsWith (COLLECTION_INFO_PAGE_PATTERN );
111
110
112
111
StringBuilder sb = new StringBuilder (MIN_HEADER_LENGTH );
You can’t perform that action at this time.
0 commit comments