Skip to content
Snippets Groups Projects
Commit 8a32d5e7 authored by Yannis Barlas's avatar Yannis Barlas
Browse files

feat(server): expose sanitized clientUrl and serverUrl

parent 5582136b
No related branches found
No related tags found
1 merge request!78feat(server): expose sanitized clientUrl \& serverUrl
......@@ -12,6 +12,7 @@ module.exports = {
database: 'POSTGRES_DB',
port: 'POSTGRES_PORT',
},
serverUrl: 'SERVER_URL',
},
fileStorage: {
accessKeyId: 'S3_ACCESS_KEY_ID',
......
......@@ -41,7 +41,8 @@ services:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-password}
- PUBSWEET_SECRET=${PUBSWEET_SECRET:-theSecret}
- SERVER_PORT=${SERVER_PORT:-3000}
# - CLIENT_URL=${CLIENT_URL:-http://0.0.0.0:4000}
# - CLIENT_URL=${CLIENT_URL:-http://0.0.0.0:4000////}
# - SERVER_URL=http://www.google.com///
# - MAILER_SENDER=${MAILER_SENDER:-dev@example.com}
# - MAILER_HOSTNAME=${MAILER_HOSTNAME}
# - MAILER_PORT=${MAILER_PORT}
......
......@@ -45,6 +45,8 @@ const {
authenticatedCall: makeOAuthCall,
} = require('./utils/authenticatedCall')
const { clientUrl, serverUrl } = require('./utils/urls')
const createJWT = authentication.token.create
const verifyJWT = authentication.token.verify
......@@ -76,4 +78,7 @@ module.exports = {
callMicroservice,
makeOAuthCall,
WaxToDocxConverter,
clientUrl,
serverUrl,
}
......@@ -15,5 +15,5 @@ const sanitizeUrlByConfigKey = configKey => {
module.exports = {
sanitizeUrlByConfigKey,
clientUrl: sanitizeUrlByConfigKey('clientUrl'),
// serverUrl: sanitizeUrlByConfigKey('serverUrl')
serverUrl: sanitizeUrlByConfigKey('pubsweet-server.serverUrl'),
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment