scemsjyd commited on
Commit
1edeb34
·
1 Parent(s): fe82834

Update main.ts

Browse files
Files changed (1) hide show
  1. main.ts +5 -1
main.ts CHANGED
@@ -4,7 +4,11 @@ serve(async (req: Request) => {
4
 
5
  let url = new URL(req.url);
6
  if (url.pathname == '/' || url.pathname == '') {
7
- return new Response("", { status: 502 })
 
 
 
 
8
  }
9
 
10
  let res = await fetch(new Request(url.pathname.substring(1) + url.search,req))
 
4
 
5
  let url = new URL(req.url);
6
  if (url.pathname == '/' || url.pathname == '') {
7
+ return new Response("Not Found", { status: 404 })
8
+ }
9
+
10
+ if (url.pathname == '/ping') {
11
+ return new Response("pong", { status: 200 })
12
  }
13
 
14
  let res = await fetch(new Request(url.pathname.substring(1) + url.search,req))