Forum Discussion

1cookie's avatar
1cookie
Occasional Contributor
4 years ago
Solved

Change domain for 'try it out' feature

Hi, So currently I'm using the standalone version of swaggerUIBundle: window.onload = function () { // Begin Swagger UI call region const ui = SwaggerUIBundle({}) }  On the front-end. When...
  • HKosova's avatar
    HKosova
    4 years ago

    You need to enable CORS on your API server, localhost:8007. The way you do this depends on the server and framework used, check out https://enable-cors.org/server.html

     

    Alternatively, hosting Swagger UI on the same server:port as the API server will avoid CORS altogether.