fix reverse proxy, the whole usage of use_ssl was incorrect ( some refactoring could be done, but not urgent )