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