LibWeb: Add Web Worker Origin Inheritance

Fetch requests from web workers fail CORS checks because the origin is
not inherited from the outside settings. Ensure web worker origin is
correctly inherited from outside settings
This commit is contained in:
Braydn
2024-07-04 11:06:54 -04:00
committed by Andrew Kaster
parent 176e3ba16a
commit 24adb1c452
3 changed files with 18 additions and 5 deletions

View File

@@ -24,7 +24,7 @@ public:
{
}
static JS::NonnullGCPtr<WorkerEnvironmentSettingsObject> setup(JS::NonnullGCPtr<Page> page, NonnullOwnPtr<JS::ExecutionContext> execution_context /* FIXME: null or an environment reservedEnvironment, a URL topLevelCreationURL, and an origin topLevelOrigin */);
static JS::NonnullGCPtr<WorkerEnvironmentSettingsObject> setup(JS::NonnullGCPtr<Page> page, NonnullOwnPtr<JS::ExecutionContext> execution_context, SerializedEnvironmentSettingsObject const& outside_settings, HighResolutionTime::DOMHighResTimeStamp unsafe_worker_creation_time);
virtual ~WorkerEnvironmentSettingsObject() override = default;