diff --git a/server/configs/application.properties b/server/configs/application.properties index 660e9d2f45..272a9f52dd 100644 --- a/server/configs/application.properties +++ b/server/configs/application.properties @@ -46,6 +46,7 @@ context.encryptionKey=@@encryptionKey@@ ## By default, we serve LabKey at the root context path (e.g. http://localhost:8080) ## You may customize the context path if you wish (e.g. http://localhost:8080/labkey) +## Context path value must start with a slash #context.contextPath=/labkey ## Using a legacy context path provides backwards compatibility with old deployments. A typical use case would be to diff --git a/server/embedded/src/org/labkey/embedded/LabKeyServer.java b/server/embedded/src/org/labkey/embedded/LabKeyServer.java index 8668045f69..69fe7bfee5 100644 --- a/server/embedded/src/org/labkey/embedded/LabKeyServer.java +++ b/server/embedded/src/org/labkey/embedded/LabKeyServer.java @@ -94,7 +94,7 @@ public static void main(String[] args) base-uri 'self' ; frame-ancestors 'self' ; frame-src 'self' ${FRAME.SOURCES} ; - report-uri /admin-contentSecurityPolicyReport.api?cspVersion=r11&${CSP.REPORT.PARAMS} + report-uri ${context.contextPath:}/admin-contentSecurityPolicyReport.api?cspVersion=r11&${CSP.REPORT.PARAMS} """ )); application.setBannerMode(Banner.Mode.OFF);