Skip to content

Commit

Permalink
Allow TeamCity to disable embedded tomcat (#695)
Browse files Browse the repository at this point in the history
* Add ${CSP.REPORT.PARAMS} to sample CSP report-uri directives
* gitignore 'external' directory that might get generated
  • Loading branch information
labkey-tchad authored Feb 2, 2024
1 parent 47ad469 commit 1573424
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ enlistment.properties
server/config.properties
#IntelliJ build output directory
server/bootstrap/out/
dist/
external/

# Ignore other common repository locations
dist/
distributions/
labkey-api-*/
labkey-ui-components/
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ windowsProteomicsBinariesVersion=1.0
# The current version numbers for the gradle plugins.
artifactoryPluginVersion=4.31.9
gradleNodePluginVersion=3.5.1
gradlePluginsVersion=2.2.1
gradlePluginsVersion=2.2.2
owaspDependencyCheckPluginVersion=8.4.3
versioningPluginVersion=1.1.2

Expand Down
6 changes: 3 additions & 3 deletions server/configs/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ spring.main.banner-mode=off
# base-uri 'self' ;\
# upgrade-insecure-requests ;\
# frame-ancestors 'self' ;\
# report-uri https://www.labkey.org/admin-contentsecuritypolicyreport.api ;
# report-uri https://www.labkey.org/admin-contentsecuritypolicyreport.api?${CSP.REPORT.PARAMS} ;

# example usage 2 - less strict but enforces directives, (NOTE: unsafe-inline is still required for many modules)

Expand All @@ -151,7 +151,7 @@ spring.main.banner-mode=off
# base-uri 'self' ;\
# upgrade-insecure-requests ;\
# frame-ancestors 'self' ;\
# report-uri https://www.labkey.org/admin-contentsecuritypolicyreport.api ;
# report-uri https://www.labkey.org/admin-contentsecuritypolicyreport.api?${CSP.REPORT.PARAMS} ;

# Default CSP for TeamCity and dev deployments
#setupTask#csp.report=\
Expand All @@ -164,7 +164,7 @@ spring.main.banner-mode=off
#setupTask# script-src 'unsafe-eval' 'strict-dynamic' 'nonce-${REQUEST.SCRIPT.NONCE}' ;\
#setupTask# base-uri 'self' ;\
#setupTask# frame-ancestors 'self' ;\
#setupTask# report-uri /admin-contentsecuritypolicyreport.api ;
#setupTask# report-uri /admin-contentsecuritypolicyreport.api?${CSP.REPORT.PARAMS} ;

# Use a non-temp directory for tomcat
#setupTask#server.tomcat.basedir=@@pathToServer@@/build/deploy/embedded
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ import org.labkey.gradle.util.BuildUtils
node in the tree with these leaves (e.g., 'server:modules:core' will create projects for ":server"
":server:modules" and ":server:modules:core").
*/
if (hasProperty("useEmbeddedTomcat"))
if (BuildUtils.useEmbeddedTomcat(this.settings))
{
include ":server:embedded"
}
Expand Down

0 comments on commit 1573424

Please sign in to comment.