Generate headers before proxy changes host and port