Skip to content

Commit 525d526

Browse files
committed
Do not turn on cors if cors: false.
1 parent ee63ef7 commit 525d526

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ bedrock.events.on('bedrock.start', async () => {
216216
}
217217
// setup cors
218218
let corsHandler = null;
219-
if('cors' in cfg) {
220-
if(typeof cfg.cors === 'boolean') {
219+
if(cfg.cors) {
220+
if(cfg.cors === true) {
221221
// if boolean format use defaults; using "*" is more secure than
222222
// reflecting an origin (see CORS rules) and is what is expected; to
223223
// reflect "origin" back, use an object with "{origin: true, ...}"

0 commit comments

Comments
 (0)