chore: Remove DEPLOYMENT and SUBDOMAINS_ENABLED (#5742)

This commit is contained in:
Tom Moor
2023-08-28 20:39:58 -04:00
committed by GitHub
parent 7725f29dc7
commit 30a4303a8e
35 changed files with 136 additions and 135 deletions

View File

@@ -11,7 +11,6 @@ import {
IsUrl,
IsOptional,
IsByteLength,
Equals,
IsNumber,
IsIn,
IsEmail,
@@ -206,13 +205,6 @@ export class Environment {
@CannotUseWithout("SSL_KEY")
public SSL_CERT = this.toOptionalString(process.env.SSL_CERT);
/**
* Should always be left unset in a self-hosted environment.
*/
@Equals("hosted")
@IsOptional()
public DEPLOYMENT = this.toOptionalString(process.env.DEPLOYMENT);
/**
* The default interface language. See translate.getoutline.com for a list of
* available language codes and their percentage translated.
@@ -240,15 +232,6 @@ export class Environment {
@IsBoolean()
public FORCE_HTTPS = this.toBoolean(process.env.FORCE_HTTPS ?? "true");
/**
* Whether to support multiple subdomains in a single instance.
*/
@IsBoolean()
@Deprecated("The community edition of Outline does not support subdomains")
public SUBDOMAINS_ENABLED = this.toBoolean(
process.env.SUBDOMAINS_ENABLED ?? "false"
);
/**
* Should the installation send anonymized statistics to the maintainers.
* Defaults to true.
@@ -666,8 +649,12 @@ export class Environment {
* Returns true if the current installation is the cloud hosted version at
* getoutline.com
*/
public isCloudHosted() {
return this.DEPLOYMENT === "hosted";
public get isCloudHosted() {
return [
"https://app.getoutline.com",
"https://app.outline.dev",
"https://app.outline.dev:3000",
].includes(this.URL);
}
private toOptionalString(value: string | undefined) {