1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-09 17:44:56 +09:00
ladybird/Libraries/LibWeb/ContentSecurityPolicy/SerializedPolicy.h
Luke Wilde 86170f4bfd LibWeb/CSP: Introduce the ability to create and report a violation
A violation provides several details about an enforcement failing, such
as the URL of the document, the directive that returned "Blocked", etc.
2025-03-19 00:55:14 +01:00

33 lines
730 B
C++

/*
* Copyright (c) 2025, Luke Wilde <luke@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibIPC/Forward.h>
#include <LibWeb/ContentSecurityPolicy/Directives/SerializedDirective.h>
#include <LibWeb/ContentSecurityPolicy/Policy.h>
namespace Web::ContentSecurityPolicy {
struct SerializedPolicy {
Vector<Directives::SerializedDirective> directives;
Policy::Disposition disposition;
Policy::Source source;
URL::Origin self_origin;
String pre_parsed_policy_string;
};
}
namespace IPC {
template<>
ErrorOr<void> encode(Encoder&, Web::ContentSecurityPolicy::SerializedPolicy const&);
template<>
ErrorOr<Web::ContentSecurityPolicy::SerializedPolicy> decode(Decoder&);
}