exposing a hook in cowboy protocol so that ssl upgrade can be performed in handler process