-
Due to this new requirement, I will need to reimplement the whole redirect implementation as until now it started a "dummy" server that redirected all requests. Now we need to have a single server with filter which will take some action before actual servlet will be called.
-
The feature is implemented and pushed into
issue #113
branches for Tigase HTTP API and Tigase HTTP API - Jetty. I've decided to replace the previous implementation using a separate HTTP server for redirections with the usage of HTTP servlet filter preprocessing requests and triggering redirection when needed. Due to that I've addedredirectCondition
and from now on you need to setredirectionUri
and correct condition for redirection to happen (default isnever
); -
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project tigase-http-api-jetty: Compilation failure [ERROR] /Users/wojtek/dev/tigase/tigase-http-api-jetty/src/main/java/tigase/http/jetty/JettyOSGiHttpServer.java:[45,8] tigase.http.jetty.JettyOSGiHttpServer is not abstract and does not override abstract method getName() in tigase.http.api.HttpServerIfc
Type |
Bug
|
Priority |
Normal
|
Assignee | |
Version |
tigase-server-8.2.0
|
Issue Votes (0)
Watchers (0)
(followup to #issue #108)
Currently redirect option takes effect always and in general that would be OK, but it somewhat breaks if we put Tigase behind LB/Proxy/anything that would terminate HTTPS for us:
In above case, we the ELB handles HTTPS (on port 443) and redirects it to Tigase on 8080 this would result in infinite redirect.
In general it's recommended to use
X-Forwarded-Proto
header and make the redirection (http->https) only if it's value equals tohttp
(e.g. How do I redirect HTTP traffic to HTTPS on my Classic Load Balancer?)Please add option
redirectOnlyHttp
which would condition whether redirect should be made (do we want to have "redirect" bean which would contain both condition and target URI? Or mayberedirectCondition
with optionshttp
,https
,always
,never
for more flexibility?)