-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
CORS preflight OPTIONS request to API returns 404 #5724
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
Comments
Closed as duplicate of #5700 There is a PR in works to resolve this |
Access-Control-Allow-Origin header And OPTIONS method response were implemented with that ticket the users purpose may have been for different purposes but they indeed accomplished the same goal |
As far as I can tell, the Gitea API is unaffected by that change. The change does not seem to affect the |
To be more clear, the pull did not implement CORS header support for the API, but it did implement support for them in git-over-http. |
That’s helpful information. Thanks :) |
It seems that Gitea doesn't add cors headers to non-option requests either. Cors headers are required on both preflight |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
Has anybody made progress or found a functional work around for this issue? |
Current workaround would be to use a reverse proxy that intercepts the request needed and returns the appropriate response. There is a pending PR for this, however it is awaiting updates from contributor. |
[x]
):Description
I'm working on a project that will make some requests to Gitea's API. As my project is on a different origin, my browser sends a CORS preflight (an OPTIONS request).
Gitea doesn't handle an OPTIONS request, and returns 404.
How to fix?
Works:
Returns 404:
Screenshots
The text was updated successfully, but these errors were encountered: