1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:07:47 +00:00

LibWeb: Implement 'create a potential-CORS request' algorithm

This commit is contained in:
Srikavin Ramkumar 2023-01-14 19:00:42 +05:30 committed by Linus Groh
parent 3e2e94bd01
commit f7176463b5
6 changed files with 122 additions and 0 deletions

View file

@ -0,0 +1,23 @@
/*
* Copyright (c) 2023, Srikavin Ramkumar <me@srikavin.me>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Optional.h>
#include <AK/String.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<String> const& keyword);
}