mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb/CSP: Implement the media-src directive
This commit is contained in:
parent
5addbcd61b
commit
1b12aa4d8e
Notes:
github-actions[bot]
2025-07-06 12:17:16 +00:00
Author: https://github.com/Lubrsi
Commit: 1b12aa4d8e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5308
Reviewed-by: https://github.com/shannonbooth
5 changed files with 95 additions and 0 deletions
|
@ -12,6 +12,7 @@
|
|||
#include <LibWeb/ContentSecurityPolicy/Directives/FrameSourceDirective.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/ImageSourceDirective.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/ManifestSourceDirective.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/MediaSourceDirective.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/Names.h>
|
||||
|
||||
namespace Web::ContentSecurityPolicy::Directives {
|
||||
|
@ -33,6 +34,9 @@ GC::Ref<Directive> create_directive(GC::Heap& heap, String name, Vector<String>
|
|||
if (name == Names::ManifestSrc)
|
||||
return heap.allocate<ManifestSourceDirective>(move(name), move(value));
|
||||
|
||||
if (name == Names::MediaSrc)
|
||||
return heap.allocate<MediaSourceDirective>(move(name), move(value));
|
||||
|
||||
return heap.allocate<Directive>(move(name), move(value));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue