Why Swagger UI sends OPTIONS request method instead of correct one, once i access to it through spring Gateway?

505 views Asked by At

I'm implementing open API 3.0 (swagger) in a webflux project. So i have a miscroservice (port 8080) made in spring webflux where I've added open API 3.0. I can access to it through http://localhost:8080/client-service/swagger/swagger-ui.html and everything work great!

I can also access to my micro service through a spring gateway (port 8989). So the url to get swagger home page via gateway is http://localhost:8989/client-service/swagger/swagger-ui.html. But the problem is when I try to execute any endpoint (post, get, delete, put) I get an error, and in the console of client-service I have the following message HTTP OPTIONS "/v2/clients/12" and not HTTP GET "/v2/clients/12". You have any idea of why it works when i access it directly via the url of the service where it is implemented and not via spring gateway?

0

There are 0 answers