-
Notifications
You must be signed in to change notification settings - Fork 0
/
.env.default
197 lines (152 loc) · 7.06 KB
/
.env.default
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
### GLOBAL VARIABLES ###
# If !false, Next's bundle(s) will be analyzed and report files generated.
ANALYZE=false
# This will overwrite the NODE_ENV setting during runtime and for the compiled
# applications.
#
# Recognized values: test development production
# Default value: empty
NODE_ENV=
# MongoDB connect URI. Specify auth credentials if necessary. YOU MUST *NOT*
# SPECIFY A DATABASE AT THE END!
MONGODB_URI=mongodb://127.0.0.1:27017
# Dedicated port to be used by the MongoDB Memory Server during unit tests.
# Especially useful when stepping through code, since you can always access the
# db at `mongodb://127.0.0.1:MONGODB_MS_PORT` when the debugger is paused.
# Tip: call `jest.setTimeout()` with a large number (i.e. 10**6) to ensure the
# MongoClient isn't closed randomly leading to strange errors.
#
# Leave this blank to choose any random port (not recommended). Note: this
# option is also used when Node is started in debug mode, e.g. `node
# --inspect-brk` or `node --debug`, or if the debugger is attached before the
# database connection is memoized.
MONGODB_MS_PORT=6666
# Determines the maximum allowed character length of an *entire* HTTP
# Authorization header. The default is 500.
AUTH_HEADER_MAX_LENGTH=500
# Controls which versions of the API will respond to requests. Examples (disable
# v1; disable v1 and v2; disable v3, v5, and v7):
# DISABLED_API_VERSIONS=1
# DISABLED_API_VERSIONS=1,2
# DISABLED_API_VERSIONS=3,5,7
#
# Note that `DISABLED_API_VERSIONS=` (i.e. empty) means no
# versions are disabled!
DISABLED_API_VERSIONS=
# Determines the number of items returned by paginated endpoints.
RESULTS_PER_PAGE=100
# If !false, all rate limits and exponential soft banning will be ignored.
IGNORE_RATE_LIMITS=false
# If !false, no one will be able to use the API.
LOCKOUT_ALL_CLIENTS=false
# Controls what request methods are allowed. Empty means all are allowed
# (default).
#
# Example, to make API read-only:
# DISALLOWED_METHODS=POST,PUT
DISALLOWED_METHODS=
# Every Nth request will be be cancelled and an HTTP 555 response returned. Note
# that, in addition to every Nth request, the very first request sent to the API
# will also return a contrived error. Set to 0 to disable all contrived errors.
REQUESTS_PER_CONTRIVED_ERROR=10
# Maximum allowed size of a request body (and content-length header value) in
# bytes. Should be a string like 1kb, 1mb, 500b.
MAX_CONTENT_LENGTH_BYTES=10kb
# Maximum number of parameters that can be passed to endpoints that accept
# multiple slash parameters.
MAX_PARAMS_PER_REQUEST=100
# Minimum allowed string length of a username.
MIN_USER_NAME_LENGTH=4
# Maximum allowed string length of a username.
MAX_USER_NAME_LENGTH=16
# Minimum allowed string length of a user email.
MIN_USER_EMAIL_LENGTH=4
# Maximum allowed string length of a user email.
MAX_USER_EMAIL_LENGTH=75
# Expected string length of a user's cryptographic salt (hexadecimal length).
USER_SALT_LENGTH=32
# Expected string length of a user's cryptographic key (hexadecimal length).
USER_KEY_LENGTH=128
# Maximum allowed length of a comment.
MAX_COMMENT_LENGTH=150
# Maximum allowed length of a question title.
MAX_QUESTION_TITLE_LENGTH=150
# Maximum allowed size of a question body. Should be a string like 1kb, 1mb,
# 500b.
MAX_QUESTION_BODY_LENGTH_BYTES=3kb
# Maximum allowed size of an answer body. Should be a string like 1kb, 1mb,
# 500b.
MAX_ANSWER_BODY_LENGTH_BYTES=3kb
# Maximum allowed length of a question subject.
MAX_MAIL_SUBJECT_LENGTH=75
# Maximum allowed size of an mail (direct message) body. Should be a string like
# 1kb, 1mb, 500b.
MAX_MAIL_BODY_LENGTH_BYTES=512b
### EXTERNAL SCRIPT VARIABLES ###
# (optional unless using the relevant external script)
# How often this script is going to be invoked. This doesn't determine anything
# automatically on its own, this is useful to ensure the script works no matter
# how often you decide to call it.
BAN_HAMMER_WILL_BE_CALLED_EVERY_SECONDS=60
# The maximum number of requests per BAN_HAMMER_RESOLUTION_WINDOW_SECONDS
# allowed by a single client.
BAN_HAMMER_MAX_REQUESTS_PER_WINDOW=10
# How far back into the past this script looks when checking a key or ip against
# BAN_HAMMER_MAX_REQUESTS_PER_WINDOW.
BAN_HAMMER_RESOLUTION_WINDOW_SECONDS=1
# The initial amount of time an offender is banned.
BAN_HAMMER_DEFAULT_BAN_TIME_MINUTES=1
# When an offender is banned twice in the same "period," they're banned for
# BAN_HAMMER_DEFAULT_BAN_TIME_MINUTES * BAN_HAMMER_RECIDIVISM_PUNISH_MULTIPLIER
# minutes instead of the default. This is also the length of the "period".
BAN_HAMMER_RECIDIVISM_PUNISH_MULTIPLIER=2
# The size (in bytes) of the root request-log collection will not be allowed to
# exceed this amount. Oldest entries are deleted first. Should be a string like
# 1kb, 1mb, 500b.
PRUNE_DATA_MAX_LOGS_BYTES=50mb
# The size (in bytes) of the root limited-log collection will not be allowed to
# exceed this amount. Oldest entries are deleted first. Should be a string like
# 1kb, 1mb, 500b.
PRUNE_DATA_MAX_BANNED_BYTES=10mb
# The size (in bytes) of the mail collection will not be allowed to exceed this
# amount. Oldest entries are deleted first. Should be a string like 1kb, 1mb,
# 500b.
PRUNE_DATA_MAX_MAIL_BYTES=10mb
# The size (in bytes) of the questions collection will not be allowed to exceed
# this amount. Oldest entries are deleted first. Should be a string like 1kb,
# 1mb, 500b.
PRUNE_DATA_MAX_QUESTIONS_BYTES=350mb
# The size (in bytes) of the users collection will not be allowed to exceed this
# amount. Oldest entries are deleted first. Should be a string like 1kb, 1mb,
# 500b.
PRUNE_DATA_MAX_USERS_BYTES=10mb
# The StackExchange client key used to ensure the initialize-data external script
# has a much higher request quota.
STACKAPPS_AUTH_KEY=
# A maximum of STACKAPPS_INTERVAL_PERIOD_MS requests will be sent to the
# StackExchange API every >=STACKAPPS_MAX_REQUESTS_PER_INTERVAL milliseconds.
#
# Must be a positive number such that no greater than 30 requests are sent per
# second or the StackExchange API will rate limit you.
STACKAPPS_INTERVAL_PERIOD_MS=1000
# A maximum of STACKAPPS_INTERVAL_PERIOD_MS requests will be sent to the
# StackExchange API every >=STACKAPPS_MAX_REQUESTS_PER_INTERVAL milliseconds.
#
# Must be a positive number such that no greater than 30 requests are sent per
# second or the StackExchange API will rate limit you.
STACKAPPS_MAX_REQUESTS_PER_INTERVAL=10
# The number of questions to render from the StackExchange API, which will be
# one less than the total number of questions inserted into the database.
STACKAPPS_TOTAL_API_GENERATED_QUESTIONS=100
# The number of answers the "collect all" questions will have.
STACKAPPS_COLLECTALL_QUESTION_ANSWERS=150
# The number of comments the "collect all" questions will have.
STACKAPPS_COLLECTALL_QUESTION_COMMENTS=250
# The number of comments the first answer of the "collect all" question will
# have.
STACKAPPS_COLLECTALL_FIRST_ANSWER_COMMENTS=150
# The maximum number of items that will be requested from the StackExchange API.
# Must be a positive number no greater than 100.
STACKAPPS_MAX_PAGE_SIZE=100
### TOOLS FRONTEND VARIABLES ###
# (optional unless using tools)