mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
LibWeb/CSP: Implement the child-src directive
This commit is contained in:
committed by
Shannon Booth
parent
c5748437db
commit
5a1de8a187
Notes:
github-actions[bot]
2025-07-19 05:16:19 +00:00
Author: https://github.com/Lubrsi Commit: https://github.com/LadybirdBrowser/ladybird/commit/5a1de8a187e Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5503
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
#include <LibJS/Runtime/Realm.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/ChildSourceDirective.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/ConnectSourceDirective.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/DefaultSourceDirective.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/Directive.h>
|
||||
@@ -28,6 +29,9 @@ namespace Web::ContentSecurityPolicy::Directives {
|
||||
|
||||
GC::Ref<Directive> create_directive(GC::Heap& heap, String name, Vector<String> value)
|
||||
{
|
||||
if (name == Names::ChildSrc)
|
||||
return heap.allocate<ChildSourceDirective>(move(name), move(value));
|
||||
|
||||
if (name == Names::ConnectSrc)
|
||||
return heap.allocate<ConnectSourceDirective>(move(name), move(value));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user