mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-24 00:49:46 +00:00
LibWeb/CSP: Implement the form-action directive
This commit is contained in:
parent
6c4483fe0e
commit
f9247116b1
Notes:
github-actions[bot]
2025-08-06 22:46:59 +00:00
Author: https://github.com/Lubrsi
Commit: f9247116b1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5626
5 changed files with 71 additions and 0 deletions
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* 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-form-action
|
||||
class FormActionDirective final : public Directive {
|
||||
GC_CELL(FormActionDirective, Directive)
|
||||
GC_DECLARE_ALLOCATOR(FormActionDirective);
|
||||
|
||||
public:
|
||||
virtual ~FormActionDirective() = default;
|
||||
|
||||
virtual Result pre_navigation_check(GC::Ref<Fetch::Infrastructure::Request const>, NavigationType, GC::Ref<Policy const>) const override;
|
||||
|
||||
private:
|
||||
FormActionDirective(String name, Vector<String> value);
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue