~repos /website

#astro#js#html#css

git clone https://pyrossh.dev/repos/website.git

木 Personal website of pyrossh. Built with astrojs, shiki, vite.


da3cf5fc pyrossh

1 year ago
fix country
Files changed (1) hide show
  1. routes/_middleware.ts +1 -2
routes/_middleware.ts CHANGED
@@ -16,13 +16,12 @@ export async function handler(req: Request, ctx: FreshContext) {
16
16
  !ipRes.bogon
17
17
  ) {
18
18
  const pathname = new URL(req.url).pathname;
19
- console.log(ipRes);
20
19
  const referer = req.headers.get("referer") || "";
21
20
  const parser = new UAParser(userAgent);
22
21
  recordVisit(
23
22
  pathname,
24
23
  referer,
25
- "India",
24
+ ipRes.country,
26
25
  parser.getOS().name,
27
26
  parser.getBrowser().name,
28
27
  );