Fix handler only checking https protocol