Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .env.localhost
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APP_BASE="https://local.zinfra.io:8081"

FORCED_CONFIG_URL="https://github.com/wireapp/wire-web-config-wire"

CSP_EXTRA_CONNECT_SRC="http://localhost:32123, ws://localhost:32123, https://*.zinfra.io, https://*.wire.link, https://*.wire.com, https://api.raygun.io, wss://*.zinfra.io, wss://*.wire.link, wss://prod-nginz-ssl.wire.com, https://wire.count.ly, https://balderdash.hogwash.work:9000, https://balderdash.hogwash.work:5556, https://accounts.google.com, https://oauth2.googleapis.com/token"
CSP_EXTRA_CONNECT_SRC="http://localhost:4570, http://localhost:32123, ws://localhost:32123, https://*.zinfra.io, https://*.wire.link, https://*.wire.com, https://api.raygun.io, wss://*.zinfra.io, wss://*.wire.link, wss://prod-nginz-ssl.wire.com, https://wire.count.ly, https://balderdash.hogwash.work:9000, https://balderdash.hogwash.work:5556, https://accounts.google.com, https://oauth2.googleapis.com/token"
CSP_EXTRA_IMG_SRC="https://*.zinfra.io, https://*.wire.com, https://*.wire.link"
CSP_EXTRA_SCRIPT_SRC="http://localhost:32123, https://*.zinfra.io, https://*.wire.com, https://*.wire.link, https://api.raygun.io"
ENFORCE_HTTPS="false"
Expand All @@ -30,3 +30,7 @@ BACKEND_WS="wss://staging-nginz-ssl.zinfra.io"
# BACKEND_REST="https://prod-nginz-https.wire.com"
# BACKEND_WS="wss://prod-nginz-ssl.wire.com"

# Use these vars if you are running a local backend. (Rare)
# BACKEND_REST="http://localhost:8080"
# BACKEND_WS="ws://localhost:8080"
# APP_BASE="http://localhost:8081"
2 changes: 1 addition & 1 deletion server/Server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ class Server {
if (this.server) {
reject('Server is already running.');
} else if (this.config.PORT_HTTP) {
if (this.config.DEVELOPMENT) {
if (this.config.DEVELOPMENT && this.config.DEVELOPMENT_ENABLE_TLS) {
const options = {
cert: fs.readFileSync(this.config.SSL_CERTIFICATE_PATH),
key: fs.readFileSync(this.config.SSL_CERTIFICATE_KEY_PATH),
Expand Down
1 change: 1 addition & 0 deletions server/config/server.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export function generateConfig(params: ConfigGeneratorParams, env: Env) {
BACKEND_REST: urls.api,
BACKEND_WS: urls.ws,
DEVELOPMENT: nodeEnv === 'development',
DEVELOPMENT_ENABLE_TLS: urls.base.startsWith('https://'),
ENFORCE_HTTPS: env.ENFORCE_HTTPS != 'false',
ENVIRONMENT: nodeEnv,
GOOGLE_WEBMASTER_ID: env.GOOGLE_WEBMASTER_ID,
Expand Down