You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you run Vaadin 14.7 / Vaadin 8.14 + MPR app running jetty:run -Pproduction and using profile settings as documented, Vaadin 8 will adopt the production mode setting correctly in the server side. However you can still open the Debug window using ?debug query parameter in the url when using non-root Routes. The debug variable is true in client side but production mode status is false in the server side,
Workaround is to force the debug to be false when root layout is attached.
@Override
public void onAttach(AttachEvent event) {
if (event.getSession().getService().getDeploymentConfiguration().isProductionMode()) {
event.getUI().getPage().executeJs("window.vaadin.debug=false;");
}
}
You can demonstrate this by checking server side production mode
If you run Vaadin 14.7 / Vaadin 8.14 + MPR app running jetty:run -Pproduction and using profile settings as documented, Vaadin 8 will adopt the production mode setting correctly in the server side. However you can still open the Debug window using ?debug query parameter in the url when using non-root Routes. The debug variable is true in client side but production mode status is false in the server side,
Workaround is to force the debug to be false when root layout is attached.
You can demonstrate this by checking server side production mode
https://github.com/TatuLund/mpr-demo/blob/dfe3ba7342e4b18567f9dec30d4fb40ffb934e52/src/main/java/org/vaadin/mprdemo/MyUI.java#L54
Complete demo
https://github.com/TatuLund/mpr-demo/tree/mpr-4
The text was updated successfully, but these errors were encountered: