Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions api/src/org/mitre/dsmiley/httpproxy/LabKeyProxyServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
Expand Down Expand Up @@ -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
Expand Down
Loading