We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access-Control-Allow-Origin
{ "Access-Control-Allow-Origin": "'undefined'", "Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", "Access-Control-Allow-Methods": "'OPTIONS,GET'", "Access-Control-Allow-Credentials": "'false'" }
functions: hello: handler: handler.hello events: - http: path: hello method: get cors: origin: '*' headers: - Content-Type - X-Amz-Date - Authorization - X-Api-Key - X-Amz-Security-Token - X-Amz-User-Agent allowCredentials: false
Similar or dependent issues:
This appears to happen because of the following statement in lib/plugins/aws/package/compile/events/apiGateway/lib/cors.js:
if (origins) { origin = origins[0]; }
origins is an array so if the array is empty origin gets overridden with undefined. I will follow up with a PR.
origins
origin
undefined
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
This is a Bug Report
Description
When trying to configure a single origin
Access-Control-Allow-Origin
is set to undefined causing API rejects:For
Access-Control-Allow-Origin
to be set to the configured value.None. Error doesn't become apparent until I try to use the API.
Similar or dependent issues:
Additional Data
master (1.36.3)
Linux (Arch)
N/A
N/A
This appears to happen because of the following statement in lib/plugins/aws/package/compile/events/apiGateway/lib/cors.js:
origins
is an array so if the array is emptyorigin
gets overridden withundefined
. I will follow up with a PR.The text was updated successfully, but these errors were encountered: