Skip to content

configUrl does not include the api gateway route #1144

@kamatvishal

Description

@kamatvishal

I am using Springdoc openapi ui running behind a spring cloud gateway (route /myapi). I followed this link for that https://springdoc.org/#how-can-i-deploy-springdoc-openapi-ui-behind-a-reverse-proxy. So when I hit the url

https://myhost.com/myapi

it redirects me to a url

https://myhost.com/myapi/webjars/swagger-ui/index.html?configUrl=/swagger-config.json

Note the configUrl value in the above redirected url. Instead of configUrl=/myapi/swagger-config.json, it has a value configUrl=/swagger-config.json.

I have below code in my application.yml file

springdoc:
  swagger-ui:
    path: /
    configUrl: /swagger-config.json

and I have set the below property as well

server.forward-headers-strategy: framework

I would have expected the redirected url to be

https://myhost.com/myapi/webjars/swagger-ui/index.html?configUrl=/myapi/swagger-config.json

and NOT

https://myhost.com/myapi/webjars/swagger-ui/index.html?configUrl=/swagger-config.json

Please advise

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions