simplify how headers are set for http/https