From 9669e094488e6e85590a31a6004bf07fa65c3229 Mon Sep 17 00:00:00 2001 From: gnat Date: Sun, 3 Nov 2024 01:54:13 -0800 Subject: [PATCH] add route for robots.txt --- src/lib/router.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib/router.py b/src/lib/router.py index 88eba96..557692d 100644 --- a/src/lib/router.py +++ b/src/lib/router.py @@ -97,6 +97,14 @@ routes = [ *raw_file_contents('.' + request.path.path) ) ), + Route( + lambda request: request.path == '/robots.txt', + [Method.GET], + lambda *_: Response( + ResponseCode.OK, + *raw_file_contents('./robots.txt') + ) + ), Route( lambda request: request.path == '/status', [Method.GET],