INNER CODE UNIT · Python
do_GET
yashab-cyber/HackGpt · workbench/server.py:368
def do_GET(self):
api = self.path.startswith("/api/")
if not self.guard(api):
return
try:
static = {
"/": ("index.html", "text/html; charset=utf-8"),
"/style.css": ("style.css", "text/css; charset=utf-8"),
"/app.js": ("app.js", "text/javascript; charset=utf-8"),
}
if self.path in static:
filename, kind = static[self.path]
return self.reply(
200,
(Path(__file__).parent / "static" / filename).read_bytes(),
kind,
)
if self.path == "/api/health":