Skip to content

Commit 032176f

Browse files
authored
CSP reports don't get reported locally if using a contextPath (#1101)
1 parent c4a51c9 commit 032176f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

server/configs/application.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ context.encryptionKey=@@encryptionKey@@
4646

4747
## By default, we serve LabKey at the root context path (e.g. http://localhost:8080)
4848
## You may customize the context path if you wish (e.g. http://localhost:8080/labkey)
49+
## Context path value must start with a slash
4950
#context.contextPath=/labkey
5051

5152
## Using a legacy context path provides backwards compatibility with old deployments. A typical use case would be to

server/embedded/src/org/labkey/embedded/LabKeyServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public static void main(String[] args)
9494
base-uri 'self' ;
9595
frame-ancestors 'self' ;
9696
frame-src 'self' ${FRAME.SOURCES} ;
97-
report-uri /admin-contentSecurityPolicyReport.api?cspVersion=r11&${CSP.REPORT.PARAMS}
97+
report-uri ${context.contextPath:}/admin-contentSecurityPolicyReport.api?cspVersion=r11&${CSP.REPORT.PARAMS}
9898
"""
9999
));
100100
application.setBannerMode(Banner.Mode.OFF);

0 commit comments

Comments
 (0)