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:
parent
af1e8a347e
commit
b02a20e4dc
5 changed files with 51 additions and 6 deletions
|
@ -332,6 +332,10 @@ void WebRequest::OnCompleted(extensions::WebRequestInfo* info,
|
|||
HandleSimpleEvent(kOnCompleted, info, request, net_error);
|
||||
}
|
||||
|
||||
void WebRequest::OnRequestWillBeDestroyed(extensions::WebRequestInfo* info) {
|
||||
callbacks_.erase(info->id);
|
||||
}
|
||||
|
||||
template <WebRequest::SimpleEvent event>
|
||||
void WebRequest::SetSimpleListener(gin::Arguments* args) {
|
||||
SetListener<SimpleListener>(event, &simple_listeners_, args);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue