Skip to content
New issue

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

refactor: Remove duplicate CORS header #1242

Merged
merged 2 commits into from
Apr 15, 2019
Merged

refactor: Remove duplicate CORS header #1242

merged 2 commits into from
Apr 15, 2019

Conversation

grant
Copy link
Contributor

@grant grant commented Apr 3, 2019

The following line is duplicate in the sample. The response header is already set on line 247.

res.set('Access-Control-Allow-Origin', '*');

Like the other sample, it should not be in the

if (req.method === 'OPTIONS') {

conditional block.

Doc: https://cloud.google.com/functions/docs/writing/http#handling_cors_requests

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 3, 2019
@grant grant requested a review from michaelawyu April 3, 2019 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants