[webkit-changes] [WebKit/WebKit] dc6a2b: CORS issue when doing fetch requests from a backgr...
Chris Dumez
noreply at github.com
Sat Nov 5 10:36:55 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: dc6a2b2784f6b088142cd583dd25f9d14b9cae03
https://github.com/WebKit/WebKit/commit/dc6a2b2784f6b088142cd583dd25f9d14b9cae03
Author: Chris Dumez <cdumez at apple.com>
Date: 2022-11-05 (Sat, 05 Nov 2022)
Changed paths:
M Source/WebCore/page/Page.h
M Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm
Log Message:
-----------
CORS issue when doing fetch requests from a background service worker in safari web extension
https://bugs.webkit.org/show_bug.cgi?id=247509
rdar://97600470
Reviewed by Timothy Hatcher.
Safari relies on the `WKWebViewConfiguration._corsDisablingPatterns` SPI to
disable CORS checks for specific domains in Web extensions. However, with
Manifest v3, extensions can now use service workers and the CORS disabling
patterns were not correctly forwarded from the service worker page to the
service worker. As a result, some Web extensions would see unexpected CORS
preflights which would often fail.
* Source/WebCore/page/Page.h:
(WebCore::Page::corsDisablingPatterns const):
* Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::installServiceWorker):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
Canonical link: https://commits.webkit.org/256357@main
More information about the webkit-changes
mailing list