From be9ba2f95826227fd46fcc46c2ca1bb061acd41e Mon Sep 17 00:00:00 2001 From: bptato Date: Sat, 23 Sep 2023 15:12:22 +0200 Subject: Add about:license --- src/loader/about.nim | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/loader') diff --git a/src/loader/about.nim b/src/loader/about.nim index f2ac6d74..054cee89 100644 --- a/src/loader/about.nim +++ b/src/loader/about.nim @@ -5,6 +5,7 @@ import loader/request import types/url const chawan = staticRead"res/chawan.html" +const license = staticRead"res/license.html" const HeaderTable = { "Content-Type": "text/html" } @@ -22,5 +23,10 @@ proc loadAbout*(handle: LoaderHandle, request: Request) = t handle.sendStatus(200) # ok t handle.sendHeaders(newHeaders(HeaderTable)) t handle.sendData(chawan) + elif request.url.pathname == "license": + t handle.sendResult(0) + t handle.sendStatus(200) # ok + t handle.sendHeaders(newHeaders(HeaderTable)) + t handle.sendData(license) else: t handle.sendResult(ERROR_ABOUT_PAGE_NOT_FOUND) -- cgit