Skip to content
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

Static file server seems to not work when accessed via /vaadinServlet #851

Open
fluorumlabs opened this issue May 17, 2021 · 8 comments
Open
Assignees

Comments

@fluorumlabs
Copy link

Steps to reproduce:

  1. Generate Spring Boot-based SVC project
  2. Start application
  3. Navigate to http://localhost:8080/vaadinServlet
  4. Observe that the image in the app layout is not shown: request to http://localhost:8888/vaadinServlet/images/logo.png returns HTML.
@miguelatvaadin
Copy link

Hi @fluorumlabs ,

could you please tell which version of Vaadin have you chosen?

Thanks,

@fluorumlabs
Copy link
Author

I've been testing with Vaadin 20.0.0.beta1 / Flow 7.0.0.beta3

@miguelatvaadin
Copy link

I understand that it is related to #802, when using VaadinWebSecurityConfigurerAdapter

@fluorumlabs
Copy link
Author

It's not related to Spring Security.

  1. Open https://labs.vaadin.com/edit-multiple/vaadinServlet/
  2. Observe "broken" image in the top left corner
  3. Image URL is https://labs.vaadin.com/edit-multiple/vaadinServlet/images/logo.png

@miguelatvaadin
Copy link

Ok. Great. Thanks for point it out, @fluorumlabs.

@miguelatvaadin
Copy link

So, when accessing the vaadin servlet directly (as it is published at /vaadinServlet by the spring plugin) to serve the app it is not serving the static content as it is not recognized as a static resource.

Removing the servlet path when calling getStaticResource inside StaticFileServer#isStaticResourceRequest would solve the issue.

The described behavior is the same for V14

@denis-anisimov denis-anisimov transferred this issue from vaadin/flow Jun 22, 2021
@mshabarov
Copy link
Contributor

To be re-tested with latest Vaadin version (23.2).

@mshabarov mshabarov self-assigned this Sep 27, 2022
@Artur-
Copy link
Member

Artur- commented Sep 27, 2022

Why should this work? /vaadinServlet/ should preferrably not even be available for direct use

@mshabarov mshabarov moved this to 🔖 Normal Priority (P2) in Vaadin Flow bugs & maintenance (Vaadin 10+) Sep 27, 2023
@mshabarov mshabarov moved this from 🔖 Normal Priority (P2) to 🆕 Needs triage in Vaadin Flow bugs & maintenance (Vaadin 10+) Sep 27, 2023
@mcollovati mcollovati moved this from 🆕 Needs triage to 🔎 Investigation in Vaadin Flow bugs & maintenance (Vaadin 10+) Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🔎 Investigation
Development

No branches or pull requests

5 participants