diff options
Diffstat (limited to 'src/util/config/Config.ts')
-rw-r--r-- | src/util/config/Config.ts | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/src/util/config/Config.ts b/src/util/config/Config.ts index 7aee1775..36c4509d 100644 --- a/src/util/config/Config.ts +++ b/src/util/config/Config.ts @@ -1,8 +1,32 @@ -import { ApiConfiguration, ClientConfiguration, DefaultsConfiguration, EndpointConfiguration, GeneralConfiguration, GifConfiguration, GuildConfiguration, KafkaConfiguration, LimitsConfiguration, LoginConfiguration, MetricsConfiguration, RabbitMQConfiguration, RegionConfiguration, RegisterConfiguration, SecurityConfiguration, SentryConfiguration, TemplateConfiguration } from "."; +import { + ApiConfiguration, + ClientConfiguration, + DefaultsConfiguration, + EndpointConfiguration, + GeneralConfiguration, + GifConfiguration, + GuildConfiguration, + KafkaConfiguration, + LimitsConfiguration, + LoginConfiguration, + MetricsConfiguration, + RabbitMQConfiguration, + RegionConfiguration, + RegisterConfiguration, + SecurityConfiguration, + SentryConfiguration, + TemplateConfiguration +} from "."; export class ConfigValue { - gateway: EndpointConfiguration = new EndpointConfiguration(); - cdn: EndpointConfiguration = new EndpointConfiguration(); + gateway: EndpointConfiguration = { + endpointPublic: '${location.protocol === "https:" ? "wss://" : "ws://"}${location.host}', + endpointPrivate: `ws://localhost:3001` + }; + cdn: EndpointConfiguration = { + endpointPublic: "${location.host}", + endpointPrivate: `http://localhost:3001` + }; api: ApiConfiguration = new ApiConfiguration(); general: GeneralConfiguration = new GeneralConfiguration(); limits: LimitsConfiguration = new LimitsConfiguration(); @@ -19,4 +43,4 @@ export class ConfigValue { metrics: MetricsConfiguration = new MetricsConfiguration(); sentry: SentryConfiguration = new SentryConfiguration(); defaults: DefaultsConfiguration = new DefaultsConfiguration(); -} \ No newline at end of file +} |