Skip to content

Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.

chore(backend): ensure URL hostname is explicit even when 0.0.0.0 is used

johaven29a15a8fe214
diff --git a/backend/src/main.ts b/backend/src/main.ts
index 2671202a..d3b6dd23 100755
--- a/backend/src/main.ts
+++ b/backend/src/main.ts
@@ -20,6 +20,11 @@ async function bootstrap() {
port: configuration.server.port
},
(error, address) => {
+ if (configuration.server.host === '0.0.0.0') {
+ const url = new URL(address)
+ url.hostname = '0.0.0.0'
+ address = url.toString()
+ }
if (error) {
logger.error(`Server listening error at ${address} : ${error}`, 'HTTP')
process.exit(1)