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

fix CORS handling for OPTIONS method #17

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

jicodes
Copy link
Contributor

@jicodes jicodes commented Jul 29, 2024

Updated the OPTIONS method to improve the handling of CORS preflight requests:

  • Changed OPTIONS method to return a response with CORS headers only, avoiding unnecessary processing.
  • Fixes the 405 error caused by reusing GET method logic for image resources in OPTIONS requests..

Copy link
Member

@nickfrosty nickfrosty left a comment

Choose a reason for hiding this comment

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

Avoiding the unnecessary processing will be good. Thanks for the PR :)

@nickfrosty nickfrosty merged commit c5f38c1 into solana-developers:main Jul 29, 2024
3 checks passed
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.

2 participants