Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Solr admin UI redirecting root path requests to http instead of https

Hi Shawn,

as Greg Wilkins already said, there are often problems with proxies not transferring the correct information to backend. What I was not able to figure out from the Solr issue:

Is only the proxy HTTPS and Solr is HTTP, or are both HTTP?

If Solr works with HTTP and the TLS termination is only done by the proxy, then it is definitely a configuration problem of both Solr and Proxy:

- You need to enable the reverse proxy customizer in Solr: https://www.eclipse.org/jetty/javadoc/jetty-9/org/eclipse/jetty/server/ForwardedRequestCustomizer.html - This one gets the special proxy "X-Forwarded-..." headers and sets the internal request parameters inside Jetty correct

- The proxy has to be configured to send above headers, especially the "X-Forwarded-Proto" needs to be set. Apache does not do this by default, nginx does (see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Proto).

Uwe

Am 24.05.2022 um 06:52 schrieb Shawn Heisey:
I'm with the Solr project. Solr runs in Jetty.  It is not embedded, the startup script runs start.jar.

I'm trying to help one of our users with a problem.  They have a proxy server handling TLS, Solr listens without encryption.

Here's the bug report on Solr:

https://issues.apache.org/jira/browse/SOLR-16200/

If they access the admin UI via the proxy server using https on the /solr URL path, where the webapp lives, everything's fine. All links stay https even though Solr is listening without encryption.  But if they access the root URL with https, Jetty is redirecting them to a URL that is hardcoded as http://server:port/solr/ instead of preserving the https:// that was used to access it, which doesn't work, because the proxy is configured with TLS.  I have reproduced the problem.  I found a way to work around the issue with my proxy server, but it would be really nice if that was not required.

Is there any way in the jetty config to have it preserve the URL scheme when it redirects?  If it were to redirect to a relative path of /solr instead of an absolute URL that contains http:// that would fix it.

What information do I need to provide to help troubleshoot and find a fix?

Thanks,
Shawn

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jetty-users

--
Uwe Schindler
uschindler@xxxxxxxxxx
ASF Member, Member of PMC and Committer of Apache Lucene and Apache Solr
Bremen, Germany
https://lucene.apache.org/
https://solr.apache.org/



Back to the top