From efaf3797897533ebaac6d96110c4c56af9fc1628 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 17 Feb 2023 10:28:33 +0100 Subject: Fix dev instance following test instances --- .github/CONTRIBUTING.md | 2 +- server/helpers/custom-validators/activitypub/misc.ts | 2 +- server/helpers/custom-validators/servers.ts | 2 +- server/models/actor/sql/shared/actor-follow-table-attributes.ts | 3 --- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 43b93daec..e635969ad 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -228,7 +228,7 @@ $ NODE_APP_INSTANCE=2 NODE_ENV=test npm start $ NODE_APP_INSTANCE=3 NODE_ENV=test npm start ``` -Then you will get access to the three nodes at `http://localhost:900{1,2,3}` +Then you will get access to the three nodes at `http://127.0.0.1:900{1,2,3}` with the `root` as username and `test{1,2,3}` for the password. Instance configurations are in `config/test-{1,2,3}.yaml`. diff --git a/server/helpers/custom-validators/activitypub/misc.ts b/server/helpers/custom-validators/activitypub/misc.ts index 4619f0eb5..279ad83dc 100644 --- a/server/helpers/custom-validators/activitypub/misc.ts +++ b/server/helpers/custom-validators/activitypub/misc.ts @@ -13,7 +13,7 @@ function isUrlValid (url: string) { } // We validate 'localhost', so we don't have the top level domain - if (CONFIG.WEBSERVER.HOSTNAME === 'localhost') { + if (CONFIG.WEBSERVER.HOSTNAME === 'localhost' || CONFIG.WEBSERVER.HOSTNAME === '127.0.0.1') { isURLOptions.require_tld = false } diff --git a/server/helpers/custom-validators/servers.ts b/server/helpers/custom-validators/servers.ts index 94fda05aa..b2aa03b77 100644 --- a/server/helpers/custom-validators/servers.ts +++ b/server/helpers/custom-validators/servers.ts @@ -10,7 +10,7 @@ function isHostValid (host: string) { } // We validate 'localhost', so we don't have the top level domain - if (CONFIG.WEBSERVER.HOSTNAME === 'localhost') { + if (CONFIG.WEBSERVER.HOSTNAME === 'localhost' || CONFIG.WEBSERVER.HOSTNAME === '127.0.0.1') { isURLOptions.require_tld = false } diff --git a/server/models/actor/sql/shared/actor-follow-table-attributes.ts b/server/models/actor/sql/shared/actor-follow-table-attributes.ts index 7dd908ece..4431aa6d1 100644 --- a/server/models/actor/sql/shared/actor-follow-table-attributes.ts +++ b/server/models/actor/sql/shared/actor-follow-table-attributes.ts @@ -1,4 +1,3 @@ -import { logger } from '@server/helpers/logger' import { Memoize } from '@server/helpers/memoize' import { ServerModel } from '@server/models/server/server' import { ActorModel } from '../../actor' @@ -9,8 +8,6 @@ export class ActorFollowTableAttributes { @Memoize() getFollowAttributes () { - logger.error('coucou') - return ActorFollowModel.getSQLAttributes('ActorFollowModel').join(', ') } -- cgit v1.2.3