Skip to content

Truly independent web browser

657 B
Raw Blame
/*
 * Copyright (c) 2023, Srikavin Ramkumar <[email protected]>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include <AK/Optional.h>
#include <AK/Utf16View.h>
#include <LibWeb/Fetch/Infrastructure/HTTP/Requests.h>

namespace Web::HTML {

// https://html.spec.whatwg.org/multipage/urls-and-fetching.html#cors-settings-attribute
enum class CORSSettingAttribute {
    NoCORS,
    Anonymous,
    UseCredentials
};

[[nodiscard]] CORSSettingAttribute cors_setting_attribute_from_keyword(Optional<Utf16View> keyword);
[[nodiscard]] Fetch::Infrastructure::Request::CredentialsMode cors_settings_attribute_credentials_mode(CORSSettingAttribute);

}