Enabling CORS

In theory, if we go back to our Swagger UI page (at 127.0.0.1:8000) and paste the URL http://localhost:8000/openapi.yaml into the input bar, it should load the page with our own API specification. However, the page shows an error about Cross-Origin Resource Sharing (CORS).

Get Building Enterprise JavaScript Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.