Wrong document in cors.md
penghuili opened this issue · comments
-
Expected behaviour:
Set CORS header correctly according to the document https://github.com/claudiajs/claudia-api-builder/blob/master/docs/cors.md -
What actually happens:
CORS headers are not set correctly. -
What's the problem:
The document says to check:
/claudiajs.com$/.test(request.headers.Origin)
Actually it should check:
/claudiajs.com$/.test(request.normalizedHeaders.origin)
which is documented correctly here: https://github.com/claudiajs/example-projects/blob/master/web-api-custom-cors/web.js
thanks, updated