Skip to content

Commit b782fae

Browse files
committed
Supports a new global configuration property: SERVER_SECURED.
This property can take two values: either true or false. True means Silverpeas is running after a secured reverse proxy (id est a reverse proxy ensuring TLS connections). The secure attribute of the session tracking cookie is valued with this property when constructing the silverpeas application.
1 parent fdb05fd commit b782fae

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/main/groovy/org/silverpeas/setup/construction/SilverpeasBuilder.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ class SilverpeasBuilder {
232232

233233
File mainWebXmlFile = mainWebXmlFiles.get(0)
234234
GPathResult mainWebXml = new XmlSlurper(false, false).parse(mainWebXmlFile)
235+
mainWebXml.'session-config'.'cookie-config'.'secure' = settings.SERVER_SECURED == 'true'
235236
new File(sourceDir, 'WEB-INF').listFiles(new FilenameFilter() {
236237
boolean accept(File f, String fileName) {
237238
return fileName.startsWith(WEB_XML_PREFIX) && fileName.endsWith('war.xml') &&

src/main/resources/default_config.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ SERVER_PORT=8000
107107
## standalone is supported
108108
SERVER_EXECUTION_MODE=standalone
109109

110+
# Is the server running after a secured reverse-proxy that ensures TLS connections: either true or
111+
# false. By default false.
112+
SERVER_SECURED=false
113+
110114
####################################################################################################
111115
## Properties of the database to use for Silverpeas.
112116
####################################################################################################

0 commit comments

Comments
 (0)