diff options
author | Clemens von Schwerin <clemens.vonschwerin@gmail.com> | 2020-09-03 10:34:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-03 11:34:46 +0300 |
commit | dcd550ec74575f77eeee0bc730fb98aa3b6acec2 (patch) | |
tree | d6cb0c0a9269d873ba8355967120772cd15d92ff /server | |
parent | d223a8b03d602f8ad05c4cb2958dea726e3e4770 (diff) | |
download | vaadin-framework-dcd550ec74575f77eeee0bc730fb98aa3b6acec2.tar.gz vaadin-framework-dcd550ec74575f77eeee0bc730fb98aa3b6acec2.zip |
Update ServletPortletHelper.java (#12087)
This is needed to get /UIDL working behind a reverse proxy. Without the change pathInfo would be "/UIDL" but prefix would be "/UIDL/" in line 105.
Diffstat (limited to 'server')
-rw-r--r-- | server/src/main/java/com/vaadin/server/ServletPortletHelper.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/server/src/main/java/com/vaadin/server/ServletPortletHelper.java b/server/src/main/java/com/vaadin/server/ServletPortletHelper.java index 82ea4a9d1d..d0daff471a 100644 --- a/server/src/main/java/com/vaadin/server/ServletPortletHelper.java +++ b/server/src/main/java/com/vaadin/server/ServletPortletHelper.java @@ -98,6 +98,10 @@ public class ServletPortletHelper implements Serializable { prefix = '/' + prefix; } + if (!pathInfo.endsWith("/") && prefix.endsWith("/")) { + pathInfo += '/'; + } + if (pathInfo.startsWith(prefix)) { return true; } |