summary refs log tree commit diff
path: root/src/util
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-05-29 23:42:06 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-05-29 23:42:06 +0200
commitbff8f0f64229b68027dfed22b9aca30509e02429 (patch)
tree56793e766f9949a1df267633c76d2d25f2f092bd /src/util
parent1.3.9 (diff)
downloadserver-bff8f0f64229b68027dfed22b9aca30509e02429.tar.xz
:sparkles: add requestSignature to Config
Diffstat (limited to 'src/util')
-rw-r--r--src/util/Config.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/Config.ts b/src/util/Config.ts
index a0d44a2d..ca6daa16 100644
--- a/src/util/Config.ts
+++ b/src/util/Config.ts
@@ -79,6 +79,7 @@ export interface DefaultOptions {
 		};
 	};
 	security: {
+		requestSignature: string;
 		jwtSecret: string;
 		forwadedFor: string | null; // header to get the real user ip address
 		captcha: {
@@ -93,7 +94,7 @@ export interface DefaultOptions {
 	};
 	register: {
 		email: {
-			necessary: boolean;
+			necessary: boolean; // we have to use necessary instead of required as the cli tool uses json schema and can't use required
 			allowlist: boolean;
 			blocklist: boolean;
 			domains: string[];
@@ -164,6 +165,7 @@ export const DefaultOptions: DefaultOptions = {
 		},
 	},
 	security: {
+		requestSignature: crypto.randomBytes(32).toString("base64"),
 		jwtSecret: crypto.randomBytes(256).toString("base64"),
 		forwadedFor: null,
 		// forwadedFor: "X-Forwarded-For" // nginx/reverse proxy