cross-origin redirect with Access-Control-Allow-Credentials

Discussion of current events and participation in intelligent conversation with other CEF users.

cross-origin redirect with Access-Control-Allow-Credentials

Postby banggi » Fri Jun 28, 2019 3:24 am

Hi :)
Im just studying CEF. The issues of CEF are very helpful to me.

https://bitbucket.org/chromiumembedded/ ... irect-with

I tried to make a simple modification to the linked issue above.

libcef/browser/net_service/proxy_url_loader_factory.cc
Code: Select all
  void InterceptedRequest::InterceptResponseReceived(
      const GURL& original_url,
      std::unique_ptr<ResourceResponse> response) {
    if (request_.url != original_url) {
    ...
       network::cors::header_names::kAccessControlAllowOrigin, origin));
   }

+ if(request_.fetch_credentials_mode == network::mojom::FetchCredentialsMode::kInclude) {
+    head.headers->AddHeader(MakeHeader(
+    network::cors::header_names::kAccessControlAllowCredentials, "true"));
+ }
   current_response_ = head;
   ...


I confirmed that it works only for the issue case. so... I want to get a review about the simple modifications above.

Also i wonder how the redirect request cancels the previous request and works. :?:
Thank you very much if you can give me a link or comment on it. :D
banggi
Newbie
 
Posts: 9
Joined: Thu Jun 20, 2019 8:17 pm

Re: cross-origin redirect with Access-Control-Allow-Credenti

Postby magreenblatt » Fri Jun 28, 2019 8:56 am

I want to get a review about the simple modifications above.

Thanks for your interest in contributing to the CEF project. Instructions for making a Pull Request are here: https://bitbucket.org/chromiumembedded/ ... l-requests

Also i wonder how the redirect request cancels the previous request and works.

The redirect response is passed back to the NetworkService which then performs the redirect. See issue #2622 for details about the NetworkService.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: cross-origin redirect with Access-Control-Allow-Credenti

Postby banggi » Sun Jun 30, 2019 7:47 pm

Thank you.
banggi
Newbie
 
Posts: 9
Joined: Thu Jun 20, 2019 8:17 pm

Re: cross-origin redirect with Access-Control-Allow-Credenti

Postby banggi » Mon Jul 01, 2019 3:00 am

Instructions for making a Pull Request are here: https://bitbucket.org/chromiumembedded/ ... l-requests

Does this mean giving me the opportunity to create the Pull Request? :o

If so, i try to Create Pull Request in https://bitbucket.org/chromiumembedded/ ... l-requests. But access denied.

I signed up in https://bitbucket.org/ and my ID is banggi. and push the commit source to my new repository. The rebase is the master branch 3770.

Anything I missed about the Pull Request access denied?
banggi
Newbie
 
Posts: 9
Joined: Thu Jun 20, 2019 8:17 pm

Re: cross-origin redirect with Access-Control-Allow-Credenti

Postby magreenblatt » Mon Jul 01, 2019 7:25 am

I think Bitbucket is broken currently. It’s not showing any pull requests on the website.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: cross-origin redirect with Access-Control-Allow-Credenti

Postby banggi » Tue Jul 02, 2019 11:49 pm

It still seems to have a problem. I have no access to the Pull Request.

My modified code imitated the your modification about cross-origin with redirect.

could you make your own style code and push the commit?

If you do not want to, I will try to press the button until the site problem solved.
banggi
Newbie
 
Posts: 9
Joined: Thu Jun 20, 2019 8:17 pm

Re: cross-origin redirect with Access-Control-Allow-Credenti

Postby magreenblatt » Wed Jul 03, 2019 7:53 am

It looks like there's already a PR: https://bitbucket.org/chromiumembedded/ ... tials/diff

When trying to create your PR did you follow the instructions from https://confluence.atlassian.com/bitbuc ... 41466.html ?
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: cross-origin redirect with Access-Control-Allow-Credenti

Postby banggi » Thu Jul 04, 2019 4:39 am

magreenblatt wrote:It looks like there's already a PR: https://bitbucket.org/chromiumembedded/ ... tials/diff

Good. Thank you.

magreenblatt wrote:When trying to create your PR did you follow the instructions from https://confluence.atlassian.com/bitbuc ... 41466.html ?

Sorry, my mistake. Now I know how to submit the PR. If I get a chance again next time, I'll try again. Thank you.
banggi
Newbie
 
Posts: 9
Joined: Thu Jun 20, 2019 8:17 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 8 guests