Closed joseluisgs closed 1 year ago
ok, solved!!! Please configure cors
install(CORS) { anyHost() // Permite cualquier host allowHeader(HttpHeaders.ContentType) }
sorry again, I have the some problem Could you help me! CORS Network Failure URL scheme must be "http" or "https" for CORS request.
I don't know why I have problem with Chrome, using private tab to, but with Mozilla Dev I can use a GET petition to my Swagger
Hi, Guessing from your description, it's not related to the swagger-plugin, but maybe some chrome-config.
Some other things you could test: Can you successfully request the endpoints with e.g. curl or postman, or does this only affect requests by your browser - if so, check if there is some browser-config regarding CORS. Otherwise, you could also try to create a new empty sample ktor-project or a sample project with another webapp-framework/library and see if the same problem persists or if it only affects ktor.
Oh, thank you so much!! It is strange, and probably it is a problem de Chrome chache or conf. Thank you so much!!!
Hi I have the following problem when I call to a methods using Swagger UI
Curl
curl -X 'GET' \ 'http://localhost:6969/' \ -H 'accept: /*'
Request URL http://localhost:6969/*
Undocumented | Failed to fetch.Possible Reasons: CORS Network FailureURL scheme must be "http" or "https" for CORS request.
I don't have CORS configuration
I have the same problem with all endpoints an routes, this example is with a String
Here it is my conf
Could you help me?