WebRequest API does not support file: requests
Categories
(WebExtensions :: Request Handling, defect, P3)
Tracking
(Not tracked)
People
(Reporter: frfxtst, Unassigned)
References
Details
(Whiteboard: triaged)
Attachments
(1 file)
1011 bytes,
application/x-zip-compressed
|
Details |
Updated•8 years ago
|
Updated•8 years ago
|
Comment 3•8 years ago
|
||
Comment 5•8 years ago
|
||
Updated•8 years ago
|
Updated•8 years ago
|
Updated•7 years ago
|
Comment 8•7 years ago
|
||
(In reply to Memmie Lenglet from comment #5)
Ok I found the why. In fact the docs says:
"Only requests made using HTTP or HTTPS will trigger events, even though
match patterns can match some other protocols"
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/webRequest/
RequestFilterAn API like registerContentHandler should be used, but it's seem impossible
to use with WebExtensions:
"For security reasons, it's not possible for an extension or web site to
register content handlers targeting other sites"
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/
registerContentHandler
Any idea why this limitation is in place? As the docs say this feature is based on Chrome's webRequest
API which does support file:///
scheme URLs.
Comment 10•5 years ago
|
||
I suspect it is more of an implementation detail in part. From this bug around data URL's I went staring at the source code a bit and I think there is just not a single abstraction at the appropriate level for all data streams that come in as URLs, so it requires special handling.
I also tried changing the filter to <ALL_URLS> because that can - contrary to the documentation - trigger the onBeforeRequest event for data: URL's. No luck here however.
Updated•5 years ago
|
Updated•2 years ago
|
Description
•