@hono/auth-js 1.0.13 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -47,8 +47,8 @@ function reqWithEnvUrl(req, authUrl) {
47
47
  }
48
48
  return new Request(reqUrlObj.href, req);
49
49
  }
50
- const newReq = new Request(req);
51
- const url = new URL(newReq.url);
50
+ const url = new URL(req.url);
51
+ const newReq = new Request(url.href, req);
52
52
  const proto = newReq.headers.get("x-forwarded-proto");
53
53
  const host = newReq.headers.get("x-forwarded-host") ?? newReq.headers.get("host");
54
54
  if (proto != null)
package/dist/index.mjs CHANGED
@@ -18,8 +18,8 @@ function reqWithEnvUrl(req, authUrl) {
18
18
  }
19
19
  return new Request(reqUrlObj.href, req);
20
20
  }
21
- const newReq = new Request(req);
22
- const url = new URL(newReq.url);
21
+ const url = new URL(req.url);
22
+ const newReq = new Request(url.href, req);
23
23
  const proto = newReq.headers.get("x-forwarded-proto");
24
24
  const host = newReq.headers.get("x-forwarded-host") ?? newReq.headers.get("host");
25
25
  if (proto != null)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hono/auth-js",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "A third-party Auth js middleware for Hono",
5
5
  "main": "dist/index.js",
6
6
  "exports": {