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

Update the v-server, enable cors #1548

Merged
merged 5 commits into from
Dec 7, 2023
Merged

Conversation

Mahmoud-Emad
Copy link
Contributor

Description

Enable CORS in the Vlang server for the /api/verify endpoint. This pull request addresses the CORS issues related to preflight (OPTIONS) and actual POST requests.

Changes

  1. Preflight Handling (preflight function):

    • Added the 'Access-Control-Allow-Headers' header to allow 'Content-Type' in the preflight response.
    • Ensured 'Access-Control-Allow-Origin', 'Access-Control-Allow-Methods', and 'Vary' headers are set.
  2. POST Request Handling (verify function):

    • Set 'Access-Control-Allow-Origin' header in the response for the actual POST request.

Related Issues

Additional Notes:

  • The 'Access-Control-Allow-Origin' header is set to '*' for allowing any origin.
  • Tested and verified the changes to resolve CORS issues.

Checklist

  • Tests included
  • Build pass
  • Documentation
  • Code format and docstrings
  • Screenshots/Video attached (needed for UI changes)

Copy link
Contributor

@0oM4R 0oM4R left a comment

Choose a reason for hiding this comment

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

Screenshot from 2023-12-03 11-59-57

works fine now, thanks

@Mahmoud-Emad Mahmoud-Emad self-assigned this Dec 4, 2023
Copy link
Contributor

@mohamedamer453 mohamedamer453 left a comment

Choose a reason for hiding this comment

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

image

Working, Great Work!

@AhmedHanafy725 AhmedHanafy725 merged commit 1535093 into development Dec 7, 2023
@AhmedHanafy725 AhmedHanafy725 deleted the development_hotfix branch December 7, 2023 10:56
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.

4 participants