Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: dc6a2b2784f6b088142cd583dd25f9d14b9cae03
      
https://github.com/WebKit/WebKit/commit/dc6a2b2784f6b088142cd583dd25f9d14b9cae03
  Author: Chris Dumez <[email protected]>
  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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to