mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
An upcoming commit will migrate the contents of Headers.h/cpp to LibHTTP for use outside of LibWeb. These CORS and MIME helpers depend on other LibWeb facilities, however, so they cannot be moved.
25 lines
879 B
C++
25 lines
879 B
C++
/*
|
|
* Copyright (c) 2022-2023, Linus Groh <linusg@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/ByteString.h>
|
|
#include <AK/StringView.h>
|
|
#include <AK/Vector.h>
|
|
#include <LibWeb/Forward.h>
|
|
|
|
namespace Web::Fetch::Infrastructure {
|
|
|
|
[[nodiscard]] bool is_cors_safelisted_request_header(Header const&);
|
|
[[nodiscard]] bool is_cors_unsafe_request_header_byte(u8);
|
|
[[nodiscard]] Vector<ByteString> get_cors_unsafe_header_names(HeaderList const&);
|
|
[[nodiscard]] bool is_cors_non_wildcard_request_header_name(StringView);
|
|
[[nodiscard]] bool is_privileged_no_cors_request_header_name(StringView);
|
|
[[nodiscard]] bool is_cors_safelisted_response_header_name(StringView, ReadonlySpan<StringView>);
|
|
[[nodiscard]] bool is_no_cors_safelisted_request_header_name(StringView);
|
|
[[nodiscard]] bool is_no_cors_safelisted_request_header(Header const&);
|
|
|
|
}
|