Unable to retrieve data from the server. The access-control-origin settings may not be configured correctly.
I have encountered this issue in the past, but it is crucial for me to get Swagger UI working properly this time. The JSON file I am attempting to access via URL is hosted on the same server, so CORS should not be necessary. Although I have enabled CORS on the server side, the headers are not being added because the browser is not sending an Origin header (presumably due to its awareness that CORS is not needed).
The JSON file does return a 200 status code and I can view its content in the response using Chrome's network tab in the developer tools. However, there is no failed request shown, making it difficult to diagnose the problem other than knowing that the petstore URL functions correctly.
Note: Swagger Editor is able to call my API without any issues, even when it is hosted on a different server. It is specifically Swagger UI that I would like to provide to users.