-
Notifications
You must be signed in to change notification settings - Fork 41.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spring Boot (Webflux) - Swagger UI - redirect URI does not include Gateway Prefix #42317
Comments
I don't undersand why this was closed w/o explanation? |
As Brian already explained, we want to allow the Springdoc team some time to evaluate springdoc/springdoc-openapi#2708. Please respect the team's wishes. Opening duplicate issues across multiple projects just wastes the time of the OSS community. |
Yes, no problem I will wait, as requested. I do still think this is a Spring Boot framework thing, since these settings are for Spring Boot (not Spring Docs) - so whichever library tries to generate an internal redirect URL, the code to add the Gateway prefix should NOT be in their library code. It should be managed by Spring Boot. Resource Server Settings:
Headers in Spring BFF when forwarding request:
|
If you believe it's a Spring Boot problem, then you should provide a complete, yet minimal sample that demonstrates that's the case. If indeed it is a Spring Boot problem, such a sample should not depend on Spring Docs, or any other third-party code. Instead it should only depend on Spring Boot and contain the minimal amount of application code that's necessary to reproduce the problem. |
Unfortunately, that's really not what we're looking for as there seem to be a significant number of moving parts that should not be relevant here. We're looking for something that's complete yet minimal. That means that it should contain only what's absolutely necessary to reproduce the problem and nothing more. What you've shared above does not appear to be minimal – if there's a problem purely with the handing of proxy headers, there should be no need to involve Spring Security. It also is not complete – without doing additional work, there's no way for us to reproduce the problem. You should start with an empty application generated by https://start.spring.io and add the bare minimum of dependencies and application code to reproduce your problem. You should then share that application with us (zip it up and attach it here or push it to a separate GitHub repository) and provide precise instructions on the steps that are necessary to reproduce it. |
Thanks Andy, Ok, I will try to get an minimal viable example up and running. |
I'm afraid it doesn't. The sample isn't minimal as it still depends on Spring Docs. It's also using Actuator which, as far as we know, isn't related to the problem. If this is a Spring Boot problem, it should be possible to reproduce it without Spring Docs. The sample also includes a controller with a request mapping for Unfortunately, having wasted quite a bit of time on this already, I can't justify spending any more time on it without concrete evidence that there's a bug in Spring Boot related to proxy header handling. |
Hi Andy, I appreciate the very stringent requirements. To meet them:
I'm not sure how much more specific I can be. I've tried to be as crystal clear as possible with how I'm seeing the problem, with screen shot backups. Happy to accommodate further requests. I think if I can generate a redirect URL manually, I should be able to narrow it down to being a Spring Boot issue, or Spring Docs issue. I'm not sure how to do that though. Thanks for your patience and understanding. |
The swagger code that does the redirect is here. When you have When you use I've opened reactor/reactor-netty#3432 to see if the reactor-netty team is interested in adding support. |
Thank you very much Phil! I do wonder why when I used Is that because I did think about adding the gateway prefix to the context path here:
But I'm not sure that would work, as I'd need to send requests to http:localhost:7080/bff/bff/context-path/ Someone suggested trying to add the gateway prefix to the context-path here reactor/reactor-netty#259 (comment) - but I didn't quite understand it. I'll try to look into it further. Thanks for the help anyway, again. |
This was closed, but I really do think this is a Spring Boot issue, rather than external library issue.
Re-opening for further consideration:
#42305
The text was updated successfully, but these errors were encountered: