LibWeb/CSP: Implement the object-src directive
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run

This commit is contained in:
Luke Wilde 2024-11-29 12:10:14 +00:00 committed by Shannon Booth
commit 985a481b5a
Notes: github-actions[bot] 2025-07-06 12:17:09 +00:00
5 changed files with 95 additions and 0 deletions

View file

@ -14,6 +14,7 @@
#include <LibWeb/ContentSecurityPolicy/Directives/ManifestSourceDirective.h>
#include <LibWeb/ContentSecurityPolicy/Directives/MediaSourceDirective.h>
#include <LibWeb/ContentSecurityPolicy/Directives/Names.h>
#include <LibWeb/ContentSecurityPolicy/Directives/ObjectSourceDirective.h>
namespace Web::ContentSecurityPolicy::Directives {
@ -37,6 +38,9 @@ GC::Ref<Directive> create_directive(GC::Heap& heap, String name, Vector<String>
if (name == Names::MediaSrc)
return heap.allocate<MediaSourceDirective>(move(name), move(value));
if (name == Names::ObjectSrc)
return heap.allocate<ObjectSourceDirective>(move(name), move(value));
return heap.allocate<Directive>(move(name), move(value));
}