mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-23 17:33:12 +00:00
JavaScript module requests (in a non-worker context) always have CORS enabled. However, CORS requests are only allowed for same-origin or HTTP/S requests. This patch extends this to allow resource:// requests from opaque origins (e.g. about: URLs). We must also set the Access-Control-Allow-Origin header to "null" to ensure that the response is accepted by the CORS checks. This does not affect requesting resource:// URLs from resource:// URLs as those are same-origin and skip CORS checks. This ultimately enables requesting resource:// JS modules from the about:settings page. |
||
---|---|---|
.. | ||
Fetching | ||
Infrastructure | ||
Body.cpp | ||
Body.h | ||
Body.idl | ||
BodyInit.cpp | ||
BodyInit.h | ||
BodyInit.idl | ||
Enums.cpp | ||
Enums.h | ||
FetchMethod.cpp | ||
FetchMethod.h | ||
Headers.cpp | ||
Headers.h | ||
Headers.idl | ||
HeadersIterator.cpp | ||
HeadersIterator.h | ||
Request.cpp | ||
Request.h | ||
Request.idl | ||
Response.cpp | ||
Response.h | ||
Response.idl |