From 6089ff1b9fc921d6aa85287ee52abae951b1bfe0 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Fri, 17 Apr 2026 17:13:51 +0000 Subject: perf: Reduce per-request work and I/O in render pipeline --- src/request.gleam | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'src/request.gleam') diff --git a/src/request.gleam b/src/request.gleam index 5ef74c1..82048af 100644 --- a/src/request.gleam +++ b/src/request.gleam @@ -1,9 +1,7 @@ import database -import envoy import gleam/int import gleam/json import gleam/list -import gleam/string import gleam/string_builder import svg import wisp @@ -25,20 +23,7 @@ pub fn handle(request, connection, image_cache, index_html) { [] -> case index_html { "" -> wisp.not_found() - content -> - wisp.html_response( - string_builder.from_string( - string.replace( - content, - "{{ MAYU_VERSION }}", - case envoy.get("MAYU_VERSION") { - Ok(version) -> "(v" <> version <> ")" - Error(_) -> "" - }, - ), - ), - 200, - ) + content -> wisp.html_response(string_builder.from_string(content), 200) } ["heart-beat"] -> wisp.html_response(string_builder.from_string("alive"), 200) -- cgit v1.2.3