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

Only apply CORS to /backends in Functions emulator #4295

Merged
merged 2 commits into from
Mar 14, 2022
Merged

Only apply CORS to /backends in Functions emulator #4295

merged 2 commits into from
Mar 14, 2022

Conversation

joehan
Copy link
Contributor

@joehan joehan commented Mar 14, 2022

Description

When adding the /backends route to the Functions emulator, we enabled CORS so that the Emulator UI could call the new endpoint. However, we did so too broadly, and caused some unexpected behavior changes (like #4294 ). This instead only applies CORS to just the /backends route.

I also noticed that we were unnecessarily using 'dataMiddleware' for this route, so I removed that.
Fixes #4294

@joehan joehan merged commit 641b916 into master Mar 14, 2022
@joehan joehan deleted the jh-cors-2 branch March 14, 2022 22:20
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.

Emulator does not invoke function when making a HTTP pre-flight OPTIONS request (firebase-tools v10)
2 participants