Closed
Description
- Gitea version (or commit ref): 1.6.1
- Git version: 2.20.1
- Operating system: OpenBSD 6.4
- Database (use
[x]
):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
- Not relevant
- Log gist:
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:
curl -X GET https://git.example.com/api/v1/repos/search
Returns 404:
curl -X OPTIONS https://git.example.com/api/v1/repos/search