mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 07:41:01 +00:00
LibWeb/CSP: Implement the script-src-elem directive
This commit is contained in:
parent
caf45f2317
commit
f382bccc3d
Notes:
github-actions[bot]
2025-07-12 01:07:54 +00:00
Author: https://github.com/Lubrsi
Commit: f382bccc3d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5404
Reviewed-by: https://github.com/shannonbooth ✅
5 changed files with 111 additions and 0 deletions
|
@ -16,6 +16,7 @@
|
|||
#include <LibWeb/ContentSecurityPolicy/Directives/Names.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/ObjectSourceDirective.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/ScriptSourceDirective.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/ScriptSourceElementDirective.h>
|
||||
|
||||
namespace Web::ContentSecurityPolicy::Directives {
|
||||
|
||||
|
@ -45,6 +46,9 @@ GC::Ref<Directive> create_directive(GC::Heap& heap, String name, Vector<String>
|
|||
if (name == Names::ScriptSrc)
|
||||
return heap.allocate<ScriptSourceDirective>(move(name), move(value));
|
||||
|
||||
if (name == Names::ScriptSrcElem)
|
||||
return heap.allocate<ScriptSourceElementDirective>(move(name), move(value));
|
||||
|
||||
return heap.allocate<Directive>(move(name), move(value));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue