@solongate/proxy 0.25.1 → 0.25.2

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.
Files changed (2) hide show
  1. package/dist/index.js +9 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -204,7 +204,15 @@ function parseArgs(argv) {
204
204
  }
205
205
  }
206
206
  if (!aiJudgeApiKey) {
207
- aiJudgeApiKey = process.env.GROQ_API_KEY;
207
+ const dotenvPath = resolve(".env");
208
+ if (existsSync(dotenvPath)) {
209
+ const dotenvContent = readFileSync(dotenvPath, "utf-8");
210
+ const groqMatch = dotenvContent.match(/^GROQ_API_KEY=(.+)/m);
211
+ if (groqMatch) aiJudgeApiKey = groqMatch[1].trim();
212
+ }
213
+ if (!aiJudgeApiKey) {
214
+ aiJudgeApiKey = process.env.GROQ_API_KEY;
215
+ }
208
216
  }
209
217
  const aiJudge = aiJudgeEnabled ? {
210
218
  enabled: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solongate/proxy",
3
- "version": "0.25.1",
3
+ "version": "0.25.2",
4
4
  "description": "MCP security proxy — protect any MCP server with customizable policies, path/command constraints, rate limiting, and audit logging. Zero code changes required.",
5
5
  "type": "module",
6
6
  "bin": {