racetrack icon indicating copy to clipboard operation
racetrack copied to clipboard

Browser preflight OPTIONS call fails

Open jsandroos opened this issue 7 months ago • 1 comments

When callling a deployed /perform endpoint from a browser, RT returns 405: not allowed.

It looks like it is the cors preflight OPTIONS call which is being triggered due to custom headers (E.g X-Racetrack-Auth)

Would there be a quick fix to allow an OPTIONS call on the /perform endpoint?

Cheers Joakim

jsandroos avatar Apr 25 '25 08:04 jsandroos

The issue might stem from the following lines in: https://github.com/TheRacetrack/racetrack/blob/master/dashboard/dashboard/api/api.py

app.router.add_api_route("/api/v1/{path:path}", _proxy_api_call, methods=["GET", "POST", "PUT", "DELETE"])

since the OPTIONS method is not included

jsandroos avatar Apr 25 '25 09:04 jsandroos