add support for headers when publishing