-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig-schema.json
84 lines (84 loc) · 3.46 KB
/
config-schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
{
"$schema": "http://json-schema.org/schema",
"properties": {
"$schema": {
"type": "string",
"description": "Links to the JSON schema (the thing generating these descriptions), don't change this!"
},
"port": {
"type": "integer",
"minimum": 0,
"default": 5000,
"description": "Port the application will run on. Will use a random port if set to 0."
},
"clientUrls": {
"type": "array",
"items": {
"type": "string"
},
"examples": [["http://localhost:5000"]],
"default": ["*"],
"description": "Client origin URLs for server to use in CORS middleware.\nIn other words, websites with any of these URLs can make requests to the API without having their browser throw a security error.\nYou can use the wildcard \"*\", meaning any website."
},
"numProxies": {
"type": "integer",
"minimum": 0,
"default": 0,
"description": "Number of proxies (eg. Cloudflare, AWS ELB, NGINX) between client and server. Used for rate limiting functionality.\n For more info see https://www.npmjs.com/package/express-rate-limit#:~:text=Troubleshooting%20Proxy%20Issues"
},
"maxRequestsPerMinute": {
"type": "integer",
"minimum": 1,
"default": 30,
"description": "Maximum number of requests a client can make to the API in a 1 minute window.\nRemember that requests with a valid \"RateLimit-Bypass-Token\" header will ignore this."
},
"rateLimitBypassTokens": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Requests with any of these in their \"RateLimit-Bypass-Token\" header will bypass rate limiting."
},
"mongoURI": {
"type": "string",
"examples": ["mongodb+srv://..."],
"description": "URI to connected to a MongoDB database with."
},
"mongoDbName": {
"type": "string",
"default": "server_registry_default",
"description": "Name of the database in MongoDB, will be created if it does not yet exist."
},
"jwtSecret": {
"type": "string",
"minLength": 8,
"examples": ["super_secret_string"],
"description": "String to sign JSON Web Tokens with, should not be easy to guess."
},
"discordClientId": {
"type": "string",
"examples": ["10503..."],
"description": "OAuth2 client ID of your Discord application."
},
"discordClientSecret": {
"type": "string",
"examples": ["abc-123..."],
"description": "OAuth2 client secret of your Discord application."
},
"maxLogSize": {
"type": "integer",
"minimum": 1,
"description": "Maximum number of recorded user permission and server status change logs.",
"default": 50
},
"minServerSize": {
"type": "integer",
"description": "A server must have at least this many users before it can be submitted to the registry.",
"minimum": 1,
"default": 25
}
},
"additionalProperties": false,
"required": ["mongoURI", "discordClientId", "discordClientSecret"]
}