(In reply to Honza Bambas (:mayhemer) from comment #17) > (In reply to Jan Honza Odvarko [:Honza] (need-info? me) from comment #16) > > > The Network panel (backend) is using nsIHttpActivityDistributor and listening for ACTIVITY_SUBTYPE_REQUEST_HEADER event. > > This happens ONLY when we decide to do a network request for the channel (either when there is no cached content, it's bypassed by flags, has to be revalidated or when we race cache and network) but NOT when we go from the cache. Note that I have cache disabled when testing this API. > Err! No, we add the CORS proxy from doContentSecurityCheck, but CheckRequestApproved is called from OnStartRequest, so this should just work. I can see that `LogBlockedRequest` is called with `CORSMissingAllowOrigin` (in `CheckRequestApproved`, C++), but when reading `channel.loadInfo.requestBlockingReason` later in `onStart/StopRequest` (JS) it says `0`. Honza
Bug 1493599 Comment 18 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
(In reply to Honza Bambas (:mayhemer) from comment #17) > (In reply to Jan Honza Odvarko [:Honza] (need-info? me) from comment #16) > > > The Network panel (backend) is using nsIHttpActivityDistributor and listening for ACTIVITY_SUBTYPE_REQUEST_HEADER event. > > This happens ONLY when we decide to do a network request for the channel (either when there is no cached content, it's bypassed by flags, has to be revalidated or when we race cache and network) but NOT when we go from the cache. Note that I have cache disabled when testing this API. > Err! No, we add the CORS proxy from doContentSecurityCheck, but CheckRequestApproved is called from OnStartRequest, so this should just work. I can see that `LogBlockedRequest` is called with `CORSMissingAllowOrigin` (in `CheckRequestApproved`, C++), but when reading `channel.loadInfo.requestBlockingReason` later in `onStart/StopRequest` (JS) it says `0`. (this happens when I am using my test case: http://janodvarko.cz/tests/bugzilla/1493599/) Honza