aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnna Koskinen <Ansku@users.noreply.github.com>2020-09-07 17:58:10 +0300
committerGitHub <noreply@github.com>2020-09-07 17:58:10 +0300
commitee48d43aac693df7a8f157f888c6b06006c9f35f (patch)
treedadc6ecf5ad12516029fa0f38401cf311c4b5e06
parent1d30a5d45adcd875c223f828ede26989b0b01283 (diff)
downloadvaadin-framework-ee48d43aac693df7a8f157f888c6b06006c9f35f.tar.gz
vaadin-framework-ee48d43aac693df7a8f157f888c6b06006c9f35f.zip
Update ServletPortletHelper.java (#12087) (#12100)
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. Authored-by: Clemens von Schwerin <clemens.vonschwerin@gmail.com>
-rw-r--r--server/src/main/java/com/vaadin/server/ServletPortletHelper.java4
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;
}