Skip to content

Commit de67dc2

Browse files
committed
hostUrl can be set via configuration
1 parent 22d3eb8 commit de67dc2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,13 @@ const express = require('express')
3434

3535
const PORT = process.env.PORT || 5000
3636
, HOST = process.env.HOST || 'localhost'
37-
, hostUrl = 'http://' + HOST + ':' + PORT
3837
, max_session_min = 180
3938
, csrfProtection = csrf({ cookie: true })
4039
;
4140

41+
let hostUrl = 'http://' + HOST + ':' + PORT
42+
if (dsConfig.appUrl != '' && dsConfig.appUrl != '{APP_URL}') {hostUrl = dsConfig.appUrl}
43+
4244
let app = express()
4345
.use(helmet())
4446
.use(express.static(path.join(__dirname, 'public')))

0 commit comments

Comments
 (0)