Skip to content

configUrl cache issue when using Swagger-UI #1712

Closed
@abenjell

Description

@abenjell

Describe the bug
Hello,
Our users access swagger using direct access to api : http://localhost:8080/api/v0/swagger-ui/index.html
And other users access the swagger UI behind nginx proxy : http://localhost/api/v0/myservice/swagger-ui/index.html
The problem is the config url is calculated just the first time and used for both access.
The issue is well known and described here

To Reproduce
Steps to reproduce the behavior:
Call swagger ui using nginx proxy : http://localhost/api/v0/myservice/swagger-ui/index.html
Call swagger UI without the proxy : http://localhost:8080/api/v0/swagger-ui/index.html
In the second call we have error message : Failed to load remote configuration.
It's because it makes a call to http://localhost:8080/api/v0/myservice/v3/api-docs/swagger-config that is built the first time when calling the swagger via nginx.

Screenshots
If applicable, add screenshots to help explain your problem.
image
image

Additional context
Add any other context about the problem here.

Thank you for your help
Best Regards,

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions