mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
LibWeb/CSP: Implement the default-src directive
This commit is contained in:
committed by
Shannon Booth
parent
25425f63ba
commit
c5748437db
Notes:
github-actions[bot]
2025-07-19 05:16:25 +00:00
Author: https://github.com/Lubrsi Commit: https://github.com/LadybirdBrowser/ladybird/commit/c5748437dbf Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5503
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <LibJS/Runtime/Realm.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/ConnectSourceDirective.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/DefaultSourceDirective.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/Directive.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/DirectiveFactory.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/FontSourceDirective.h>
|
||||
@@ -30,6 +31,9 @@ GC::Ref<Directive> create_directive(GC::Heap& heap, String name, Vector<String>
|
||||
if (name == Names::ConnectSrc)
|
||||
return heap.allocate<ConnectSourceDirective>(move(name), move(value));
|
||||
|
||||
if (name == Names::DefaultSrc)
|
||||
return heap.allocate<DefaultSourceDirective>(move(name), move(value));
|
||||
|
||||
if (name == Names::FontSrc)
|
||||
return heap.allocate<FontSourceDirective>(move(name), move(value));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user