ecrs-auth-core 1.0.115 → 1.0.116

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.
@@ -28,9 +28,13 @@ let JwtCustomerStrategy = class JwtCustomerStrategy extends (0, passport_1.Passp
28
28
  if (!url)
29
29
  return null;
30
30
  try {
31
- const hostname = new URL(url).hostname; // e.g. "acme.ecrs.com"
31
+ const hostname = new URL(url).hostname; // e.g. "acme.ecrs.com" or "wht.localhost"
32
32
  const parts = hostname.split(".");
33
- return parts.length > 2 ? parts[0] : null;
33
+ if (parts.length > 2)
34
+ return parts[0];
35
+ if (parts.length === 2 && parts[1] === "localhost")
36
+ return parts[0];
37
+ return null;
34
38
  }
35
39
  catch {
36
40
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ecrs-auth-core",
3
- "version": "1.0.115",
3
+ "version": "1.0.116",
4
4
  "description": "Centralized authentication and authorization module for ECRS apps",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",