LibWeb: Create policy containers from responses and then run CSP init

This allows us to parse the Content-Security-Policy header and
Referrer-Policy header from navigation responses and actually allow
them to start having an effect.
This commit is contained in:
Luke Wilde 2024-11-25 17:01:26 +00:00 committed by Alexander Kalenik
commit 819bff9ec0
Notes: github-actions[bot] 2025-03-13 15:20:26 +00:00
8 changed files with 113 additions and 6 deletions

View file

@ -97,6 +97,9 @@ public:
bool is_closing() const { return m_closing; }
void initialize_policy_container(GC::Ref<Fetch::Infrastructure::Response const> response, GC::Ref<EnvironmentSettingsObject> environment);
[[nodiscard]] ContentSecurityPolicy::Directives::Directive::Result run_csp_initialization() const;
protected:
explicit WorkerGlobalScope(JS::Realm&, GC::Ref<Web::Page>);