I tried to:
- Wrap CefRequestContext (with CefRequestContext::GetGlobalContext() as wrapped instance) and provide a custom implementation for only ResolveHost.
Result: Passing this instance to CreateBrowserSync does not trigger any calls to the wrapper request. Browser still works normally. - Creating a CefRequest instance with CefRequest::Create() and trying to override the Host header with SetHeaderByName. Then loading the request with GetMainFrame()->LoadRequest(req).
Result: The Host header in the request is not different then what was parsed from the URL - Overriding CefRequestHandler and CefResourceRequestHandler. Then update the Host header with SetHeaderByName in OnBeforeResourceLoad.
Result: OnBeforeResourceLoad is called, the Host header initially is not present in the header map and setting it does not have any effect.
I am running CEF Version: 87.1.6+g315d248+chromium-87.0.4280.66
How can I achieve this?