From 5e4ff7cf9b965f4f623a31e836d69067d66b8149 Mon Sep 17 00:00:00 2001 From: Armin Date: Mon, 25 Mar 2019 13:34:02 +0100 Subject: [PATCH] Fix tests --- backend/src/activitypub/ActivityPub.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/activitypub/ActivityPub.js b/backend/src/activitypub/ActivityPub.js index afb75086a..52ad8a91c 100644 --- a/backend/src/activitypub/ActivityPub.js +++ b/backend/src/activitypub/ActivityPub.js @@ -34,7 +34,7 @@ export default class ActivityPub { dotenv.config() const url = new URL(process.env.GRAPHQL_URI) // TODO Check why the hostname attribute in the prod env not containing the tld! Following line is a quick fix!! - const hostname = url.hostname.endsWith('.org') ? url.hostname : url.hostname.concat('.org') + const hostname = url.hostname.endsWith('.org') || url.hostname.indexOf('localhost') > -1 ? url.hostname : url.hostname.concat('.org') activityPub = new ActivityPub(hostname || 'localhost', url.port || 4000, url.origin) // integrate into running graphql express server