mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:04:59 +00:00
pro: Warn if credentials will not be considered for Authorization
This commit is contained in:
parent
b5cae5867a
commit
a969eac848
1 changed files with 5 additions and 0 deletions
|
@ -255,6 +255,11 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
auto const encoded_credentials = TRY(encode_base64(credentials.bytes()));
|
||||
auto const authorization = TRY(String::formatted("Basic {}", encoded_credentials));
|
||||
request_headers.set("Authorization", authorization.to_deprecated_string());
|
||||
} else {
|
||||
if (is_http_url && has_credentials && has_manual_authorization_header)
|
||||
warnln("* Skipping encoding provided authorization, manual header present.");
|
||||
if (!is_http_url && has_credentials)
|
||||
warnln("* Skipping adding Authorization header, request was not for the HTTP protocol.");
|
||||
}
|
||||
|
||||
Function<void()> setup_request = [&] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue