fix: webRequest should be able to modify CORS headers (#21099)

* fix: always use extraHeaders mode

* fix: clear pending callbacks

* fix: do not use "extraHeaders" for net module

* test: webRequest should be able to modify CROS headers

* chore: CROS => CORS

Co-Authored-By: Milan Burda <milan.burda@gmail.com>

* chore: CROS => CORS

Co-Authored-By: Milan Burda <milan.burda@gmail.com>
This commit is contained in:
Cheng Zhao 2019-11-14 14:51:24 +09:00 committed by GitHub
parent af1e8a347e
commit b02a20e4dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 51 additions and 6 deletions

View file

@ -84,6 +84,7 @@ class WebRequest : public gin::Wrappable<WebRequest>, public WebRequestAPI {
void OnCompleted(extensions::WebRequestInfo* info,
const network::ResourceRequest& request,
int net_error) override;
void OnRequestWillBeDestroyed(extensions::WebRequestInfo* info) override;
enum SimpleEvent {
kOnSendHeaders,