Add header in asynchronous and synchronous custom url handler.