LibWeb/CSP: Implement the manifest-src directive

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

View file

@ -11,6 +11,7 @@
#include <LibWeb/ContentSecurityPolicy/Directives/FontSourceDirective.h>
#include <LibWeb/ContentSecurityPolicy/Directives/FrameSourceDirective.h>
#include <LibWeb/ContentSecurityPolicy/Directives/ImageSourceDirective.h>
#include <LibWeb/ContentSecurityPolicy/Directives/ManifestSourceDirective.h>
#include <LibWeb/ContentSecurityPolicy/Directives/Names.h>
namespace Web::ContentSecurityPolicy::Directives {
@ -29,6 +30,9 @@ GC::Ref<Directive> create_directive(GC::Heap& heap, String name, Vector<String>
if (name == Names::ImgSrc)
return heap.allocate<ImageSourceDirective>(move(name), move(value));
if (name == Names::ManifestSrc)
return heap.allocate<ManifestSourceDirective>(move(name), move(value));
return heap.allocate<Directive>(move(name), move(value));
}