Add support for globally configurable headers. Implementation idea from @greggman