Skip to content

Browser preflight OPTIONS call fails #17

@jsandroos

Description

@jsandroos

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)

This stems from the api setup function in api.py which implements:
@options.api.post('/perform') def _perform_endpoint(payload: Dict[str, Any] = Body(default=example_input))

This strictly enforces only POST requests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions