Closed
Description
I don't think this is a bug on the springdoc's side, but rather some unusability with the setup of kubernetes nginx-ingress + webapp with springdoc.
The observation is as follows:
- Browser visits https://some-host-name/some/path/prefix/swagger-ui.html
- Browser gets back HTTP 307 to redirect to /webjars/swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config
- Browser visits https://some-host-name/webjars/swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config
As step 3 above, the configured nginx-ingress does not recognize the path as it does not start with the /some/path/prefix, hence redirect the request to the nginx home page.
The nginx-ingress is configured with:
{
"apiVersion": "extensions/v1beta1",
"kind": "Ingress",
"metadata": {
"annotations": {
"kubernetes.io/ingress.class": "nginx-private",
"nginx.ingress.kubernetes.io/rewrite-target": "/$2"
},
"name": "some-ingress",
"namespace": "some-namespace"
},
"spec": {
"rules": [
{
"host": "some-host-name",
"http": {
"paths": [
{
"backend": {
"serviceName": "webapp-service",
"servicePort": 80
},
"path": "/some/path/prefix(/|$)(.*)"
}
]
}
}
]
}
}
I'm not sure if you have any solution for this kind of setup?
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
No labels