LoadRequest in Cef simple apllication

Do not post support requests, bug reports or feature requests. Discuss CEF here. Non-CEF related discussion goes in General Discussion!

Re: LoadRequest in Cef simple apllication

Postby chayal » Tue Oct 19, 2021 3:59 am

Hi,
Thanks for the help. It worked !!! I was able to modify the URL and load the request.
I have one more doubt:
I implemented OnBeforeResourceLoad and modified request headers but I am not able to set Referer header as "about:blank" .
I tried it by 2 methods:
1 . Method I:
CefRequest::HeaderMap headerMap;
request->GetHeaderMap(headerMap);
headerMap.insert(std::make_pair(CefString("Referer"), CefString("about:blank")));
request->SetHeaderMap(headerMap);

2. Method 2:
CefString referrer = "about:blank";
CefRequest::ReferrerPolicy policy = REFERRER_POLICY_ORIGIN;
request->SetReferrer(referrer, policy);

In both the cases I don't see the Referer header added into the list of headers we see on fiddler app.
What is the correct way of doing this.
Thanks in advance.
chayal
Techie
 
Posts: 25
Joined: Sat Oct 02, 2021 4:50 pm

Previous

Return to CEF Discussion

Who is online

Users browsing this forum: No registered users and 4 guests