Skip to content

Fix an issue with CORS when a preflight request has an empty headers list#30

Merged
edwin-huber merged 1 commit intoAzure:devfrom
Picterra:fix_cors_empty_headers
Jul 14, 2018
Merged

Fix an issue with CORS when a preflight request has an empty headers list#30
edwin-huber merged 1 commit intoAzure:devfrom
Picterra:fix_cors_empty_headers

Conversation

@julienr
Copy link
Copy Markdown

@julienr julienr commented Jun 5, 2018

Without this fix, azurite would fail because it was trying to call

request.httpProps[N.ACCESS_CONTROL_REQUEST_HEADERS].toLowerCase()

which will result in trying to call undefined.toLowerCase() if the preflight
request doesn't specify access-control-request-headers.

In addition, when validating a request against the CORS, the request would
fail to be validated if access-control-request-headers was empty.

…list.

Without this fix, azurite would fail because it was trying to call

  request.httpProps[N.ACCESS_CONTROL_REQUEST_HEADERS].toLowerCase()

which will result in trying to call undefined.toLowerCase() if the preflight
request doesn't specify access-control-request-headers.

In addition, when validating a request against the CORS, the request would
fail to be validated if access-control-request-headers was empty.
@msftclas
Copy link
Copy Markdown

msftclas commented Jun 5, 2018

CLA assistant check
All CLA requirements met.

@edwin-huber edwin-huber changed the base branch from master to dev June 18, 2018 15:52
@edwin-huber edwin-huber self-assigned this Jul 14, 2018
@edwin-huber
Copy link
Copy Markdown
Collaborator

Many thanks for your contribution!

@edwin-huber edwin-huber merged commit 31460be into Azure:dev Jul 14, 2018
gpatryk pushed a commit to gpatryk/Azurite that referenced this pull request Dec 7, 2018
Fix an issue with CORS when a preflight request has an empty headers list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants