You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2023/07/04 15:04:57 UTC
[sling-whiteboard] branch master updated: Revert "oidc-rp: try to detect https requests when behind a TLS terminating proxy"
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git
The following commit(s) were added to refs/heads/master by this push:
new dd6c97c6 Revert "oidc-rp: try to detect https requests when behind a TLS terminating proxy"
dd6c97c6 is described below
commit dd6c97c65bd782da0610f33451ae23581564162c
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Tue Jul 4 18:03:48 2023 +0300
Revert "oidc-rp: try to detect https requests when behind a TLS terminating proxy"
This reverts commit 25e1b97138292239cb635c965308c334ecc580bf.
The correct approach is to configure the Felix HTTP service to set
org.apache.felix.proxy.load.balancer.connection.enable=true
---
.../apache/sling/servlets/oidc_rp/impl/OidcConnectionFinderImpl.java | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/org.apache.sling.servlets.oidc-rp/src/main/java/org/apache/sling/servlets/oidc_rp/impl/OidcConnectionFinderImpl.java b/org.apache.sling.servlets.oidc-rp/src/main/java/org/apache/sling/servlets/oidc_rp/impl/OidcConnectionFinderImpl.java
index c54d986b..8e429815 100644
--- a/org.apache.sling.servlets.oidc-rp/src/main/java/org/apache/sling/servlets/oidc_rp/impl/OidcConnectionFinderImpl.java
+++ b/org.apache.sling.servlets.oidc-rp/src/main/java/org/apache/sling/servlets/oidc_rp/impl/OidcConnectionFinderImpl.java
@@ -166,10 +166,7 @@ public class OidcConnectionFinderImpl implements OidcConnectionFinder, OidcConne
@Override
public URI getOidcEntryPointUri(OidcConnection connection, SlingHttpServletRequest request, String redirectPath) {
StringBuilder uri = new StringBuilder();
- String scheme = request.getScheme();
- if ( "http".equals(scheme) && request.isSecure() )
- scheme = "https";
- uri.append(scheme).append("://").append(request.getServerName()).append(":").append(request.getServerPort())
+ uri.append(request.getScheme()).append("://").append(request.getServerName()).append(":").append(request.getServerPort())
.append(OidcEntryPointServlet.PATH).append("?c=").append(connection.name());
if ( redirectPath != null )
uri.append("?redirect=").append(URLEncoder.encode(redirectPath, StandardCharsets.UTF_8));