mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb/CSP: Implement the img-src directive
This commit is contained in:
parent
1689353beb
commit
715061fb79
Notes:
github-actions[bot]
2025-07-05 09:22:55 +00:00
Author: https://github.com/Lubrsi
Commit: 715061fb79
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5276
Reviewed-by: https://github.com/shannonbooth ✅
5 changed files with 95 additions and 0 deletions
|
@ -10,6 +10,7 @@
|
|||
#include <LibWeb/ContentSecurityPolicy/Directives/DirectiveFactory.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/FontSourceDirective.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/FrameSourceDirective.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/ImageSourceDirective.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/Names.h>
|
||||
|
||||
namespace Web::ContentSecurityPolicy::Directives {
|
||||
|
@ -25,6 +26,9 @@ GC::Ref<Directive> create_directive(GC::Heap& heap, String name, Vector<String>
|
|||
if (name == Names::FrameSrc)
|
||||
return heap.allocate<FrameSourceDirective>(move(name), move(value));
|
||||
|
||||
if (name == Names::ImgSrc)
|
||||
return heap.allocate<ImageSourceDirective>(move(name), move(value));
|
||||
|
||||
return heap.allocate<Directive>(move(name), move(value));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue