Allow the req handler to be used by both http and https