Enable a custom redirect port for non-secure redirection

Create issue
Issue #1174 new
Francis L created an issue

Right now with SSLMiddleware, if we are redirected to a non secure page, the code assume that we want to strip :433 to use default :80. If we are using a custom SSLPORT, we will be redirected to the SSLPORT.

In development, this cause problem because we aren't using the default 80 port and we surely don't want to use the SSLPORT for non-ssl page.

Here is a modified version (patch) of the SSLMiddleware.py, it check if a SERVER_PORT is set in the settings.py. If so, the redirect will use that port for non-secure page.

If the SERVERPORT isn't set, the code will behave as before.

Comments (0)

  1. Log in to comment