sasjs / server

Build Apps on Base SAS
https://server.sasjs.io
MIT License
20 stars 3 forks source link

Server fails when CORS enabled and no WHITELIST is present #125

Closed allanbowe closed 2 years ago

allanbowe commented 2 years ago

To reproduce, deploy an app with CORS=enable and WHITELIST=

Expected - the app would still work when the domain is the same

Nice to have - if WHITELIST is empty then ALL domains are accessible (it would be fine to throw an ERROR or WARNING in the console for this)

saadjutt01 commented 2 years ago

Cannot allow all (*) for origin with credentials: true which is required.

Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSNotSupportingCredentials

Throwing error for no WHITELIST provided Or invalid URL is present ( if explicitly set CORS=enable)

image image
ghost commented 2 years ago

:tada: This issue has been resolved in version 0.14.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: