Return-Path: X-Original-To: apmail-chemistry-dev-archive@www.apache.org Delivered-To: apmail-chemistry-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B81E49117 for ; Thu, 9 Feb 2012 18:58:22 +0000 (UTC) Received: (qmail 15844 invoked by uid 500); 9 Feb 2012 18:58:22 -0000 Delivered-To: apmail-chemistry-dev-archive@chemistry.apache.org Received: (qmail 15427 invoked by uid 500); 9 Feb 2012 18:58:22 -0000 Mailing-List: contact dev-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list dev@chemistry.apache.org Received: (qmail 15404 invoked by uid 99); 9 Feb 2012 18:58:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Feb 2012 18:58:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Feb 2012 18:58:20 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 3BBE21AD939 for ; Thu, 9 Feb 2012 18:58:00 +0000 (UTC) Date: Thu, 9 Feb 2012 18:58:00 +0000 (UTC) From: "Gert Dewit (Issue Comment Edited) (JIRA)" To: dev@chemistry.apache.org Message-ID: <937256933.20338.1328813880246.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1290787720.14071.1328696579451.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Issue Comment Edited] (CMIS-500) AtomPubUtils: Take the X-Forwarded-Host and X-Forwarded-Proto request headers into account when calculating the baseUrl MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CMIS-500?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D132047= 33#comment-13204733 ]=20 Gert Dewit edited comment on CMIS-500 at 2/9/12 6:56 PM: --------------------------------------------------------- This seems a good strategy to me. This filter can be used where the combination of the correct Apache reverse= proxy config and Tomcat RemoteIpValve is not possible (no Apache reverse p= roxy, No Apache Tomcat). The sample configs below can be used with an Apache HTTP Server based rever= se proxy and Apache Tomcat as backed server. The published url for the application is https://www.frontend.org/cmis, the= Apache HTTP server handles https termination and it's IP address is 192.16= 8.100.254. httpd.conf snippet: {code} RequestHeader set X-Forwarded-Proto "https" ProxyPreserveHost ProxyPass http://tomcat.backend.org:8080/cmis ProxyPassReverse http://tomcat.backend.org:8080/cmis {code} The ProxyPreserveHost directive will pass the Original Host HTTP header to = the proxied host, for this example www.frontend.org, which will be returned= by request.getServerName(). tomcat server.xml snippet: {code}{code} The valve will take care of binding the https scheme to the request.getSche= me() and 443 to request.getServerPort() =20 was (Author: gertux): This seems a good strategy to me. This filter can be used where the combination of the correct Apache reverse= proxy config and Tomcat RemoteIpValve is not possible (no Apache reverse p= roxy, No Apache Tomcat). The sample configs below can be used with an Apache HTTP Server based rever= se proxy and Apache Tomcat as backed server. The published url for the application is https://www.frontend.org/cmis, the= Apache HTTP server handles https termination and it's IP address is 192.16= 8.100.254. httpd.conf snippet: RequestHeader set X-Forwarded-Proto "https" ProxyPreserveHost ProxyPass http://tomcat.backend.org:8080/cmis ProxyPassReverse http://tomcat.backend.org:8080/cmis The ProxyPreserveHost directive will pass the Original Host HTTP header to = the proxied host, for this example www.frontend.org, which will be returned= by request.getServerName(). tomcat server.xml snippet: The valve will take care of binding the https scheme to the request.getSche= me() and 443 to request.getServerPort() =20 > AtomPubUtils: Take the X-Forwarded-Host and X-Forwarded-Proto request hea= ders into account when calculating the baseUrl > -------------------------------------------------------------------------= ---------------------------------------------- > > Key: CMIS-500 > URL: https://issues.apache.org/jira/browse/CMIS-500 > Project: Chemistry > Issue Type: Improvement > Components: opencmis-server > Affects Versions: OpenCMIS 0.7.0 > Reporter: Gert Dewit > Assignee: Florian M=C3=BCller > Labels: patch > Fix For: OpenCMIS 0.7.0 > > Attachments: XForwardedHeaders.patch > > > When the OpenCMIS server is deployed behind a reverse proxy, the service = document doesn't return the correct URLs. > If it takes the X-Forwarded-Host and X-Forwarded-Proto request headers in= to account when calculating the baseUrl the URLs are correct. > A patch against revision 1241367 is attached. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira