swagger-editor
swagger-editor copied to clipboard
Swagger ui on https, requesting api on Http (TypeError: NetworkError when attempting to fetch resource.)
I have a swagger editor hosted locally on some https url. My Api's are on http. when calling the api i am getting above mentioned error. Is there any way i can avoid (TypeError: NetworkError when attempting to fetch resource.) which seem due to CORS or un-matched schemes. On my calling api i have have added CORS exception for my swagger api url which is on https but still getting same error. Any way i can avoid this error by changing something in swagger editor hosted locally
Duplicate of #https://github.com/swagger-api/swagger-ui/issues/4586
- browse "https://host.docker.internal/identity/connect/token" this url in new tab of your browser or the url where u r getting error.....u can find that url by doing F12 and see errors........
- try to access it forcefully with options like advanced...etc....
- it will then show {"error":"invalid_request"}
- now go back to your swagger tab and authorize it with creds.....it will work....