LibWeb: Simplify String to CORSSettingAttribute value conversion
There's no need to check the "anonymous" case explicitly, as `CORSSettingAttribute::Anonymous` is the default value.
This commit is contained in:
parent
aabf1a65b1
commit
7b08fd9f72
Notes:
sideshowbarker
2024-07-17 07:43:44 +09:00
Author: https://github.com/tcl3 Commit: https://github.com/SerenityOS/serenity/commit/7b08fd9f72 Pull-request: https://github.com/SerenityOS/serenity/pull/23670
1 changed files with 0 additions and 3 deletions
|
@ -15,9 +15,6 @@ CORSSettingAttribute cors_setting_attribute_from_keyword(Optional<String> const&
|
|||
// its missing value default is the No CORS state
|
||||
return CORSSettingAttribute::NoCORS;
|
||||
}
|
||||
if (keyword->is_empty() || keyword->bytes_as_string_view().equals_ignoring_ascii_case("anonymous"sv)) {
|
||||
return CORSSettingAttribute::Anonymous;
|
||||
}
|
||||
if (keyword->bytes_as_string_view().equals_ignoring_ascii_case("use-credentials"sv)) {
|
||||
return CORSSettingAttribute::UseCredentials;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue