Projects tigase _server tigase-http-api Issues #108
Add option to redirect requests from http to https (#108)
Closed
wojciech.kapcia@tigase.net opened 4 years ago

It's beneficial to use HTTPS as much as possible, however often it's required to add redirection from http to https. While it's possible to have it done using external solutions (additional http server like nginx or apache or some sort of load balancer with such feature) it would be convenient to have it build-in into http-api component -- it should be relatively small and simple but would let reduce resource usage on the machine.

Andrzej Wójcik (Tigase) commented 4 years ago

Feature implemented. To make it work, you need to add redirectUri to the port configuration of the HTTP server. This value needs to set to the prefix of the URL and has support for {host} which can be used as a variable to keep the server name in the redirection from the original request, ie. redirectUri = 'https://{host}:8089' to redirect request to the same server but on port 8089 (path URI and query string will be automatically appended to the redirection URL)

wojciech.kapcia@tigase.net commented 4 years ago

Thank you for implementing it. I added documentation of the feature. As per our conversation I also renamed configuration option from redirectUri to redirectEndpoint.

issue 1 of 1
Type
New Feature
Priority
Normal
Assignee
Version
tigase-server-8.2.0
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/tigase-http-api#108
Please wait...
Page is in error, reload to recover