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:
parent
3e2e94bd01
commit
f7176463b5
6 changed files with 122 additions and 0 deletions
23
Userland/Libraries/LibWeb/HTML/CORSSettingAttribute.h
Normal file
23
Userland/Libraries/LibWeb/HTML/CORSSettingAttribute.h
Normal 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);
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue