Bug 258848

Summary: Use the URL of the referrer module as the HTTP referrer for import requests
Product: WebKit Reporter: nicolo.ribaudo
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: cyb.ai.815, mark.lam, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description nicolo.ribaudo 2023-07-04 00:58:37 PDT
Safari always uses the document URL as the HTTP referrer when loading modules. HTML defines the referrer for imported modules as the URL of the module that performs the import, both for static imports and (since https://github.com/whatwg/html/pull/9407) for dynamic imports.

WPT test: https://github.com/web-platform-tests/wpt/blob/66166fa9af2d53656da3f04a0f5e114e740a00c7/html/semantics/scripting-1/the-script-element/module/module-import-referrer.html
Comment 1 Radar WebKit Bug Importer 2023-07-11 00:59:15 PDT
<rdar://problem/112064543>