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

Changes in "vaadin.devmode.hostsAllowed" is not picked up even on server restart. #18400

Open
sujoykd opened this issue Jan 5, 2024 · 2 comments

Comments

@sujoykd
Copy link

sujoykd commented Jan 5, 2024

Description of the bug

In v24.3.2, changes in vaadin.devmode.hostsAllowed from application.properties is not picked up even on server restart.

This seems to be related to #18318 since the deploymentConfiguration is read from the session here - https://github.com/vaadin/flow/blob/main/flow-server/src/main/java/com/vaadin/flow/server/communication/IndexHtmlRequestHandler.java#L95

Expected behavior

Changes in properties should be picked up every time on server restart

Minimal reproducible example

  1. Download sample project from start.vaadin.com with 24.3.2 & Spring boot
  2. Make changes in vaadin.devmode.hostsAllowed, restart app and check if the changes work.

Repeat step 2 multiple times to observe that changes dont work on server restart.

Versions

  • Vaadin / Flow version: 24.3.2
  • Java version: 17
@tepi
Copy link
Contributor

tepi commented Jan 9, 2024

Might be related to #18318 since the code referenced in the original description fetches the configuration from session - so if the session is persisted over the restart, the value of vaadin.devmode.hostsAllowed will definitely not be updated currently.

@tepi tepi self-assigned this Jan 10, 2024
@tepi
Copy link
Contributor

tepi commented Jan 15, 2024

In flow-client we have 21 usages of com.vaadin.flow.server.VaadinSession#getConfiguration and 32 usages of com.vaadin.flow.server.VaadinService#getDeploymentConfiguration. Unfortunately there seems to be not much logic on when either of these methods is used, e.g. IndexHtmlRequestHandler is using both in different parts of the code to check if production mode is enabled.

Maybe it could be possible for us to change the 21 usages of the session-tied configuration to use the method from VaadinService. Although not sure if this change would break something for some use case.

@mshabarov Any thoughts?

@caalador caalador moved this from 🔖 High Priority (P1) to 🏗 WIP in Vaadin Flow bugs & maintenance (Vaadin 10+) Feb 6, 2024
@tepi tepi moved this from 🏗 WIP to 🔖 High Priority (P1) in Vaadin Flow bugs & maintenance (Vaadin 10+) Feb 20, 2024
@mshabarov mshabarov moved this from 🪵Product backlog to 🅿️Parking lot in Vaadin Flow ongoing work (Vaadin 10+) Dec 2, 2024
@mshabarov mshabarov moved this from 🔖 High Priority (P1) to 🔖 Normal Priority (P2) in Vaadin Flow bugs & maintenance (Vaadin 10+) Dec 10, 2024
@mshabarov mshabarov moved this from 🅿️Parking lot to 📥Inbox - needs triage in Vaadin Flow ongoing work (Vaadin 10+) Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🔖 Normal Priority (P2)
Status: 📥Inbox - needs triage
Development

No branches or pull requests

3 participants