File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 11# bedrock-express ChangeLog
22
3+ ## 8.5.2 - 2025-12-dd
4+
5+ ### Fixed
6+ - Use ` cors() ` defaults when cors options are specified as ` true ` in the
7+ bedrock configuration instead of as an object with granular options. It is
8+ important that the defaults are used in this case and not just the "origin"
9+ reflection mechanism both for security reasons and because some newer
10+ browsers do not send an ` origin ` header in some circumstances.
11+
312## 8.5.1 - 2025-10-31
413
514### Fixed
Original file line number Diff line number Diff line change @@ -218,8 +218,10 @@ bedrock.events.on('bedrock.start', async () => {
218218 let corsHandler = null ;
219219 if ( 'cors' in cfg ) {
220220 if ( typeof cfg . cors === 'boolean' ) {
221- // if boolean format and pass through
222- corsHandler = cors ( { origin : cfg . cors } ) ;
221+ // if boolean format use defaults; using "*" is more secure than
222+ // reflecting an origin (see CORS rules) and is what is expected; to
223+ // reflect "origin" back, use an object with "{origin: true, ...}"
224+ corsHandler = cors ( ) ;
223225 } else {
224226 // if object, use as cors config
225227 corsHandler = cors ( cfg . cors ) ;
You can’t perform that action at this time.
0 commit comments