mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:07:34 +00:00
Ladybird+LibWeb: Add initial about:version internal page
This commit is contained in:
parent
05c0640474
commit
cde14901bc
7 changed files with 100 additions and 1 deletions
|
@ -230,6 +230,12 @@ void ResourceLoader::load(LoadRequest& request, SuccessCallback success_callback
|
|||
HashMap<ByteString, ByteString, CaseInsensitiveStringTraits> response_headers;
|
||||
response_headers.set("Content-Type", "text/html; charset=UTF-8");
|
||||
|
||||
// About version page
|
||||
if (url.path_segment_at_index(0) == "version") {
|
||||
success_callback(MUST(load_about_version_page()).bytes(), response_headers, {});
|
||||
return;
|
||||
}
|
||||
|
||||
// Other about static HTML pages
|
||||
auto resource = Core::Resource::load_from_uri(MUST(String::formatted("resource://ladybird/{}.html", url.path_segment_at_index(0))));
|
||||
if (!resource.is_error()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue