added functionality for handling HTTPS routes