mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 01:29:17 +00:00
LibWeb/CSP: Implement the style-src directive
This commit is contained in:
parent
d1abd11b78
commit
8b0b3b186f
Notes:
github-actions[bot]
2025-07-17 23:59:22 +00:00
Author: https://github.com/Lubrsi
Commit: 8b0b3b186f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5490
Reviewed-by: https://github.com/shannonbooth ✅
6 changed files with 130 additions and 1 deletions
|
@ -18,6 +18,7 @@
|
|||
#include <LibWeb/ContentSecurityPolicy/Directives/ScriptSourceAttributeDirective.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/ScriptSourceDirective.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/ScriptSourceElementDirective.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/StyleSourceDirective.h>
|
||||
|
||||
namespace Web::ContentSecurityPolicy::Directives {
|
||||
|
||||
|
@ -53,6 +54,9 @@ GC::Ref<Directive> create_directive(GC::Heap& heap, String name, Vector<String>
|
|||
if (name == Names::ScriptSrcElem)
|
||||
return heap.allocate<ScriptSourceElementDirective>(move(name), move(value));
|
||||
|
||||
if (name == Names::StyleSrc)
|
||||
return heap.allocate<StyleSourceDirective>(move(name), move(value));
|
||||
|
||||
return heap.allocate<Directive>(move(name), move(value));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue