You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,29 @@ All notable changes to this project will be documented in this file.
4
4
The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
5
and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
7
+
## [5.0.0] (2019-06-20)
8
+
9
+
### BREAKING CHANGES
10
+
11
+
The way API clients are internally stored has changed. After upgrading to 5.0.0, existing clients must be migrated. See https://docs.dadi.cloud/api/5.0#migrating-from-version-4-to-5 for more information.
12
+
13
+
### Added
14
+
15
+
-[#532](https://github.com/dadi/api/pull/532): add new endpoints for document versioning
16
+
-[#533](https://github.com/dadi/api/pull/533): compress responses using gzip
17
+
-[#538](https://github.com/dadi/api/pull/538): add global search endpoint and various improvements to search
18
+
-[#547](https://github.com/dadi/api/pull/547): add support for ETag and If-None-Match headers
Copy file name to clipboardExpand all lines: config.js
+87-35Lines changed: 87 additions & 35 deletions
Original file line number
Diff line number
Diff line change
@@ -11,33 +11,38 @@ var conf = convict({
11
11
},
12
12
publicUrl: {
13
13
host: {
14
-
doc: 'The host of the URL where the API instance can be publicly accessed at',
14
+
doc:
15
+
'The host of the URL where the API instance can be publicly accessed at',
15
16
format: '*',
16
17
default: null,
17
18
env: 'URL_HOST'
18
19
},
19
20
port: {
20
-
doc: 'The port of the URL where the API instance can be publicly accessed at',
21
+
doc:
22
+
'The port of the URL where the API instance can be publicly accessed at',
21
23
format: '*',
22
24
default: null,
23
25
env: 'URL_PORT'
24
26
},
25
27
protocol: {
26
-
doc: 'The protocol of the URL where the API instance can be publicly accessed at',
28
+
doc:
29
+
'The protocol of the URL where the API instance can be publicly accessed at',
27
30
format: 'String',
28
31
default: 'http',
29
32
env: 'URL_PROTOCOL'
30
33
}
31
34
},
32
35
server: {
33
36
host: {
34
-
doc: 'Accept connections on the specified address. If the host is omitted, the server will accept connections on any IPv6 address (::) when IPv6 is available, or any IPv4 address (0.0.0.0) otherwise.',
37
+
doc:
38
+
'Accept connections on the specified address. If the host is omitted, the server will accept connections on any IPv6 address (::) when IPv6 is available, or any IPv4 address (0.0.0.0) otherwise.',
35
39
format: '*',
36
40
default: null,
37
41
env: 'HOST'
38
42
},
39
43
port: {
40
-
doc: 'Accept connections on the specified port. A value of zero will assign a random port.',
44
+
doc:
45
+
'Accept connections on the specified port. A value of zero will assign a random port.',
41
46
format: Number,
42
47
default: 8081,
43
48
env: 'PORT'
@@ -79,14 +84,16 @@ var conf = convict({
79
84
env: 'SSL_INTERMEDIATE_CERTIFICATE_PATH'
80
85
},
81
86
sslIntermediateCertificatePaths: {
82
-
doc: 'The filenames of SSL intermediate certificates, overrides sslIntermediateCertificate (singular)',
87
+
doc:
88
+
'The filenames of SSL intermediate certificates, overrides sslIntermediateCertificate (singular)',
83
89
format: Array,
84
90
default: [],
85
91
env: 'SSL_INTERMEDIATE_CERTIFICATE_PATHS'
86
92
}
87
93
},
88
94
datastore: {
89
-
doc: 'The name of the npm module that implements the data connector used for storing documents',
95
+
doc:
96
+
'The name of the npm module that implements the data connector used for storing documents',
90
97
format: String,
91
98
default: '@dadi/api-mongodb'
92
99
},
@@ -107,7 +114,8 @@ var conf = convict({
107
114
default: 'YOU-MUST-CHANGE-ME!'
108
115
},
109
116
accessCollection: {
110
-
doc: 'The name of the internal collection used to store aggregate permissions data',
117
+
doc:
118
+
'The name of the internal collection used to store aggregate permissions data',
111
119
format: String,
112
120
default: 'accessStore'
113
121
},
@@ -122,7 +130,8 @@ var conf = convict({
122
130
default: 'roleStore'
123
131
},
124
132
datastore: {
125
-
doc: 'The name of the npm module that implements the data connector used for authentication',
133
+
doc:
134
+
'The name of the npm module that implements the data connector used for authentication',
126
135
format: String,
127
136
default: '@dadi/api-mongodb'
128
137
},
@@ -131,34 +140,52 @@ var conf = convict({
131
140
format: String,
132
141
default: 'test',
133
142
env: 'DB_AUTH_NAME'
143
+
},
144
+
hashSecrets: {
145
+
doc: 'Whether to hash client secrets',
146
+
format: Boolean,
147
+
default: true
148
+
},
149
+
saltRounds: {
150
+
doc: 'The number of rounds to go through when hashing a password',
151
+
format: Number,
152
+
default: 10
134
153
}
135
154
},
136
155
search: {
156
+
database: {
157
+
doc:
158
+
'The name of the database to use for storing and querying indexed documents',
159
+
format: String,
160
+
default: 'search',
161
+
env: 'DB_SEARCH_NAME'
162
+
},
163
+
datastore: {
164
+
doc: 'The datastore to use for storing and querying indexed documents',
165
+
format: String,
166
+
default: ''
167
+
},
137
168
enabled: {
138
169
doc: 'If true, API responds to collection /search endpoints',
139
170
format: Boolean,
140
171
default: false
141
172
},
173
+
indexCollection: {
174
+
doc:
175
+
'The name of the datastore collection that will hold the index of word matches',
176
+
format: String,
177
+
default: 'searchIndex'
178
+
},
142
179
minQueryLength: {
143
180
doc: 'Minimum search string length',
144
181
format: Number,
145
182
default: 3
146
183
},
147
184
wordCollection: {
148
-
doc: 'The name of the datastore collection that will hold tokenized words',
149
-
format: String,
150
-
default: 'words'
151
-
},
152
-
datastore: {
153
-
doc: 'The datastore to use for storing and querying indexed documents',
154
-
format: String,
155
-
default: '@dadi/api-mongodb'
156
-
},
157
-
database: {
158
-
doc: 'The name of the database to use for storing and querying indexed documents',
185
+
doc:
186
+
'The name of the datastore collection that will hold tokenized words',
159
187
format: String,
160
-
default: 'search',
161
-
env: 'DB_SEARCH_NAME'
188
+
default: 'searchWords'
162
189
}
163
190
},
164
191
caching: {
@@ -196,7 +223,8 @@ var conf = convict({
196
223
},
197
224
redis: {
198
225
enabled: {
199
-
doc: 'If enabled, cache files will be saved to the specified Redis server',
226
+
doc:
227
+
'If enabled, cache files will be saved to the specified Redis server',
200
228
format: Boolean,
201
229
default: false,
202
230
env: 'REDIS_ENABLED'
@@ -249,7 +277,8 @@ var conf = convict({
249
277
},
250
278
accessLog: {
251
279
enabled: {
252
-
doc: 'If true, HTTP access logging is enabled. The log file name is similar to the setting used for normal logging, with the addition of "access". For example `api.access.log`.',
280
+
doc:
281
+
'If true, HTTP access logging is enabled. The log file name is similar to the setting used for normal logging, with the addition of "access". For example `api.access.log`.',
253
282
format: Boolean,
254
283
default: true
255
284
},
@@ -290,14 +319,16 @@ var conf = convict({
290
319
default: false
291
320
},
292
321
routes: {
293
-
doc: 'An array of routes to test. Each route object must contain properties `route` and `expectedResponseTime`.',
322
+
doc:
323
+
'An array of routes to test. Each route object must contain properties `route` and `expectedResponseTime`.',
294
324
format: Array,
295
325
default: []
296
326
}
297
327
},
298
328
query: {
299
329
useVersionFilter: {
300
-
doc: 'If true, the API version parameter is extracted from the request URL and passed to the database query',
330
+
doc:
331
+
'If true, the API version parameter is extracted from the request URL and passed to the database query',
301
332
format: Boolean,
302
333
default: false
303
334
}
@@ -319,7 +350,8 @@ var conf = convict({
319
350
default: 'catboat-beatific-drizzle'
320
351
},
321
352
tokenExpiresIn: {
322
-
doc: 'The duration a signed token is valid for. Expressed in seconds or a string describing a time span (https://github.com/zeit/ms). Eg: 60, "2 days", "10h", "7d"',
353
+
doc:
354
+
'The duration a signed token is valid for. Expressed in seconds or a string describing a time span (https://github.com/zeit/ms). Eg: 60, "2 days", "10h", "7d"',
323
355
format: '*',
324
356
default: '1h'
325
357
},
@@ -334,19 +366,22 @@ var conf = convict({
334
366
default: 'workspace/media'
335
367
},
336
368
pathFormat: {
337
-
doc: 'Determines the format for the generation of subdirectories to store uploads',
369
+
doc:
370
+
'Determines the format for the generation of subdirectories to store uploads',
0 commit comments