Added `force secure` configuration variable to allow user modifiable behavior.
Improved implementation of secure redirection filter.

The coding is more verbose to allow for easier modifications.