-
Notifications
You must be signed in to change notification settings - Fork 3.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
Problems with resource resolution in SBA 2.1.0 having server.servlet.context-path set #990
Comments
Just for local development (using |
No, also in staging environment. |
I also have the same problem on staging environment as @dickerpulli . With version 2.0.4 and defined a |
Seeing the same behavior with the (equivalent?) configuration option spring.boot.admin.contextPath. The index page (and presumably API) resolve from the specified context path (i.e. /sba) but the UI loads static assets using host relative paths instead of including the context path, causing the blank white page and lots of errors on the console.
|
👍 |
Some for me. This is critical, because usually one would deploy the admin ui to a tomcat webserver, where the servlet path is derived from the application filename. So if you deploy a my-admin.war file, the location will be http://yourserver:8080/my-admin. In this case, as others mentioned already, spring-admin will still try to resolve the assets from localhost:8080/assets/... even if server.servlet.context-path is set! |
I've currently very limited time to do a fix. You can stick to the 2.0.x server until then - the api for sba-client/-server is up- and downwards compatible |
Not sure about GP. For us, upgrading was important because the 2.0.4 client wasn't playing nice in a Spring Boot 2.1.0 application. That said, I never did much testing with 2.1.0 client and 2.0.4 server. Sounds like that would be a good option to look at. |
I can confirm the 2.1.0 client works with 2.0.4 server. thanks! |
Fix provided at #997 |
@dotpanic Could you post a project to reproduce? A quick test (using cli parameters did work for me) |
I'm sorry, the previous error was on my side (wrong docker container deployment). The href is now filled with a base URL:
But I now get some Mixed Content errors in browser: The main page is served via HTTPS and so the base href should be set to:
I can't understand if it's a Spring Boot or Spring Boot Admin issue. Here is my server configuration;
My SBA is served behind a reverse proxy, nginx being in charge of SSL implementation: Browser ---https---> nginx ---http---> SBA |
@dotpanic when running behind a proxy make sure the forward headers are set and taken into account. See https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-use-tomcat-behind-a-proxy-server |
@joshiste setting server.use-forward-headers to true did the trick! Thank you! :) |
Unfortunately, its not possible to set a relative path such as |
I have the same problem with the mixed-content block in the browser and the base href set to a fixed http url. Unfortunately EDIT: Was able to resolve this by setting the following spring properties:
|
With having server.servlet.context-path set the resource resolution doesn't work property with SBA 2.1.0 wich results in a currupted login-page and a white page after login.
This problem only occurs when I set server.servlet.context-path. After deleting this property everythings works fine.
The text was updated successfully, but these errors were encountered: