LibWeb/CSP: Implement the form-action directive

This commit is contained in:
Luke Wilde 2024-12-04 11:24:19 +00:00 committed by Alexander Kalenik
commit f9247116b1
Notes: github-actions[bot] 2025-08-06 22:46:59 +00:00
5 changed files with 71 additions and 0 deletions

View file

@ -11,6 +11,7 @@
#include <LibWeb/ContentSecurityPolicy/Directives/Directive.h>
#include <LibWeb/ContentSecurityPolicy/Directives/DirectiveFactory.h>
#include <LibWeb/ContentSecurityPolicy/Directives/FontSourceDirective.h>
#include <LibWeb/ContentSecurityPolicy/Directives/FormActionDirective.h>
#include <LibWeb/ContentSecurityPolicy/Directives/FrameSourceDirective.h>
#include <LibWeb/ContentSecurityPolicy/Directives/ImageSourceDirective.h>
#include <LibWeb/ContentSecurityPolicy/Directives/ManifestSourceDirective.h>
@ -41,6 +42,9 @@ GC::Ref<Directive> create_directive(GC::Heap& heap, String name, Vector<String>
if (name == Names::FontSrc)
return heap.allocate<FontSourceDirective>(move(name), move(value));
if (name == Names::FormAction)
return heap.allocate<FormActionDirective>(move(name), move(value));
if (name == Names::FrameSrc)
return heap.allocate<FrameSourceDirective>(move(name), move(value));