From e3cc258d70d0ae572329ccaba0ac006397978d6f Mon Sep 17 00:00:00 2001 From: XingY Date: Mon, 12 Oct 2026 09:43:20 -0700 Subject: [PATCH] GH Issue 1494: Remove experimental feature: Use strict protocol match for redirects for dockerized RStudio with ALB --- .../mitre/dsmiley/httpproxy/LabKeyProxyServlet.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/api/src/org/mitre/dsmiley/httpproxy/LabKeyProxyServlet.java b/api/src/org/mitre/dsmiley/httpproxy/LabKeyProxyServlet.java index 334265e563e..1cde905c70d 100644 --- a/api/src/org/mitre/dsmiley/httpproxy/LabKeyProxyServlet.java +++ b/api/src/org/mitre/dsmiley/httpproxy/LabKeyProxyServlet.java @@ -23,11 +23,9 @@ public class LabKeyProxyServlet extends ProxyServlet /** The source URI to proxy from , defaults to /{contextpath}/{servletpath} */ protected static final String P_SOURCE_PATH = "sourcePath"; - protected static final String FLEX_REDIRECT_PROTOCOL = "flexRedirectProtocol"; public static final String ALLOW_PROTOCOL_UPGRADE_PARAM_NAME = "LKS-protocolUpgradeEnabled"; protected String sourcePath; - private boolean flexRedirectProtocol; private boolean _allowProtocolUpgrade; @Override @@ -37,12 +35,6 @@ protected void initTarget() throws ServletException sourcePath = getConfigParam(P_SOURCE_PATH); - String flexRedirectProtocolString = getConfigParam(FLEX_REDIRECT_PROTOCOL); - if (flexRedirectProtocolString != null) - { - this.flexRedirectProtocol = Boolean.parseBoolean(flexRedirectProtocolString); - } - // httpclient5 v5.4 protocolUpgradeEnabled default to true // https://github.com/apache/httpcomponents-client/commit/3235f00 this._allowProtocolUpgrade = readBooleanConfigParam(ALLOW_PROTOCOL_UPGRADE_PARAM_NAME, true); @@ -141,7 +133,7 @@ protected String rewriteUrlFromResponse(HttpServletRequest servletRequest, Strin LOG.info("getTargetHost(servletRequest): {}", getTargetHost(servletRequest)); LOG.info("servletRequest.getRequestURL(): {}", servletRequest.getRequestURL()); - if (flexRedirectProtocol && theUrl.startsWith("https://localhost:") && targetUri.startsWith("http://localhost:")) + if (theUrl.startsWith("https://localhost:") && targetUri.startsWith("http://localhost:")) { // Issue 47596: Make Dockerized version of rstudio server work in LabKey's AWS environment // For unknown reason, with AWS ALB, docker instance uses inconsistent http vs https protocol