-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Feature Request
Is your feature request related to a problem or unsupported use case? Please describe.
Currently, requests from a browser application (for instance, using xapi.js) are blocked because the client application sends preflight requests before every other request (GET /xAPI/statements etc.).
Ralph does not handle preflight request because CORS is not enabled on the FastAPI side of things.
Describe the solution you'd like
Use FastAPI's CORSMiddleware to handle preflight requests.
Describe alternatives you've considered
CORS could also be handled by a proxy server (such as nginx running as a reverse proxy for Ralph). This requires modifying the proxy's host config for Ralph, and seems a bit boilerplate to me.
Discovery, Documentation, Adoption, Migration Strategy
There should be no change to otherwise working features.