diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-12-19 22:03:08 +1100 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-12-19 22:04:52 +1100 |
commit | ddd3c860431275e5900766b6e10ae65edcd66eae (patch) | |
tree | 67cefbb85d0bc759b6e2b2c2bc5cc48f98dc3360 /src/util/config | |
parent | Add register ratelimit (diff) | |
download | server-ddd3c860431275e5900766b6e10ae65edcd66eae.tar.xz |
Registration tokens
Diffstat (limited to 'src/util/config')
-rw-r--r-- | src/util/config/types/SecurityConfiguration.ts | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/util/config/types/SecurityConfiguration.ts b/src/util/config/types/SecurityConfiguration.ts index ca610216..0fa396c9 100644 --- a/src/util/config/types/SecurityConfiguration.ts +++ b/src/util/config/types/SecurityConfiguration.ts @@ -2,16 +2,17 @@ import crypto from "crypto"; import { CaptchaConfiguration, TwoFactorConfiguration } from "."; export class SecurityConfiguration { - captcha: CaptchaConfiguration = new CaptchaConfiguration(); - twoFactor: TwoFactorConfiguration = new TwoFactorConfiguration(); - autoUpdate: boolean | number = true; - requestSignature: string = crypto.randomBytes(32).toString("base64"); - jwtSecret: string = crypto.randomBytes(256).toString("base64"); - // header to get the real user ip address - // X-Forwarded-For for nginx/reverse proxies - // CF-Connecting-IP for cloudflare - forwadedFor: string | null = null; - ipdataApiKey: string | null = "eca677b284b3bac29eb72f5e496aa9047f26543605efe99ff2ce35c9"; + captcha: CaptchaConfiguration = new CaptchaConfiguration(); + twoFactor: TwoFactorConfiguration = new TwoFactorConfiguration(); + autoUpdate: boolean | number = true; + requestSignature: string = crypto.randomBytes(32).toString("base64"); + jwtSecret: string = crypto.randomBytes(256).toString("base64"); + // header to get the real user ip address + // X-Forwarded-For for nginx/reverse proxies + // CF-Connecting-IP for cloudflare + forwadedFor: string | null = null; + ipdataApiKey: string | null = "eca677b284b3bac29eb72f5e496aa9047f26543605efe99ff2ce35c9"; mfaBackupCodeCount: number = 10; statsWorldReadable: boolean = true; + defaultRegistrationTokenExpiration: number = 1000 * 60 * 60 * 24 * 7; //1 week } |