Context:
I am using spring-boot 2.4.3, springdoc-openapi-webflux-ui version 1.5.7
Problem statement:
When I hit the url (this url is just an example to explain my problem) https://www.mywebsite.com/webjars/swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config, the servers dropdown has a value of https://mywebsite.com
Note that the servers dropdown value does not have a "www" in it. Although my website works with and without www in the url, when I try to execute an api on the Swagger UI using the "Try it out" link, it gives me a CORS exception saying the domain https://www.mywebsite.com does not match with https://mywebsite.com
Some additional inputs that might help:
I tried using org.springframework.http.server.reactive.ServerHttpRequest in the application which is running behind the ALB url mentioned above. serverHttpRequest.getURI() returns me the value https://www.mywebsite.com. So not exactly sure what is causing the servers dropdown url to cut off the "www" from the url.
Any help is appreciated.
Thanks
Context:
I am using spring-boot 2.4.3, springdoc-openapi-webflux-ui version 1.5.7
Problem statement:
When I hit the url (this url is just an example to explain my problem) https://www.mywebsite.com/webjars/swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config, the servers dropdown has a value of https://mywebsite.com
Note that the servers dropdown value does not have a "www" in it. Although my website works with and without www in the url, when I try to execute an api on the Swagger UI using the "Try it out" link, it gives me a CORS exception saying the domain https://www.mywebsite.com does not match with https://mywebsite.com
Some additional inputs that might help:
I tried using org.springframework.http.server.reactive.ServerHttpRequest in the application which is running behind the ALB url mentioned above. serverHttpRequest.getURI() returns me the value https://www.mywebsite.com. So not exactly sure what is causing the servers dropdown url to cut off the "www" from the url.
Any help is appreciated.
Thanks