@voltagent/server-core 2.1.11 → 2.1.12

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
@@ -6522,9 +6522,16 @@ __name(resolveAuthNextAccess, "resolveAuthNextAccess");
6522
6522
 
6523
6523
  // src/auth/utils.ts
6524
6524
  function isDevRequest(req) {
6525
- const hasDevHeader = req.headers.get("x-voltagent-dev") === "true";
6526
6525
  const isDevEnv = process.env.NODE_ENV !== "production";
6527
- return hasDevHeader && isDevEnv;
6526
+ if (!isDevEnv) {
6527
+ return false;
6528
+ }
6529
+ const hasDevHeader = req.headers.get("x-voltagent-dev") === "true";
6530
+ if (hasDevHeader) {
6531
+ return true;
6532
+ }
6533
+ const url = new URL(req.url, "http://localhost");
6534
+ return url.searchParams.get("dev") === "true";
6528
6535
  }
6529
6536
  __name(isDevRequest, "isDevRequest");
6530
6537
  function hasConsoleAccess(req) {