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

feat (sync-service): support OPTIONS requests #1649

Merged
merged 3 commits into from
Sep 9, 2024
Merged

Conversation

kevin-dp
Copy link
Contributor

@kevin-dp kevin-dp commented Sep 9, 2024

This PR fixes #1646 by adding support for HTTP OPTIONS requests.

Copy link

netlify bot commented Sep 9, 2024

Deploy Preview for electric-next ready!

Name Link
🔨 Latest commit 6f9b714
🔍 Latest deploy log https://app.netlify.com/sites/electric-next/deploys/66deccd8fc8f890008683336
😎 Deploy Preview https://deploy-preview-1649--electric-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@robacourt robacourt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@kevin-dp
Copy link
Contributor Author

kevin-dp commented Sep 9, 2024

@robacourt Current implementation accepts all origins by explicitly allowing the provided origin (when provided as an origin header in the request). I chose to implement it like that because access-control-allow-origin: * only works for requests without credentials. So this looked to be a more robust way of accepting any origin.

@kevin-dp kevin-dp merged commit a95a269 into main Sep 9, 2024
13 checks passed
@kevin-dp kevin-dp deleted the kevin/options-request branch September 9, 2024 11:49
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.

support OPTIONS http requests
2 participants