mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-23 17:33:12 +00:00
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
28 lines
900 B
C++
28 lines
900 B
C++
/*
|
|
* Copyright (c) 2024, Luke Wilde <luke@ladybird.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibWeb/ContentSecurityPolicy/Directives/Directive.h>
|
|
|
|
namespace Web::ContentSecurityPolicy::Directives {
|
|
|
|
// https://w3c.github.io/webappsec-csp/#directive-object-src
|
|
class ObjectSourceDirective final : public Directive {
|
|
GC_CELL(ObjectSourceDirective, Directive)
|
|
GC_DECLARE_ALLOCATOR(ObjectSourceDirective);
|
|
|
|
public:
|
|
virtual ~ObjectSourceDirective() = default;
|
|
|
|
virtual Result pre_request_check(GC::Heap&, GC::Ref<Fetch::Infrastructure::Request const>, GC::Ref<Policy const>) const override;
|
|
virtual Result post_request_check(GC::Heap&, GC::Ref<Fetch::Infrastructure::Request const>, GC::Ref<Fetch::Infrastructure::Response const>, GC::Ref<Policy const>) const override;
|
|
|
|
private:
|
|
ObjectSourceDirective(String name, Vector<String> value);
|
|
};
|
|
|
|
}
|