Skip to content

Commit 35d905c

Browse files
committed
Update server-v1.ts
1 parent 6ed6f90 commit 35d905c

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/server-v1.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -921,10 +921,11 @@ export function createV1Server() {
921921
try {
922922
const { name, arguments: args } = request.params;
923923
924-
const apiKey = process.env.CLOUD_SERVICE
925-
? (request.params._meta?.apiKey as string)
926-
: FIRECRAWL_API_KEY;
927-
if (process.env.CLOUD_SERVICE && !apiKey) {
924+
const apiKey =
925+
process.env.CLOUD_SERVICE === 'true'
926+
? (request.params._meta?.apiKey as string)
927+
: FIRECRAWL_API_KEY;
928+
if (process.env.CLOUD_SERVICE === 'true' && !apiKey) {
928929
throw new Error('No API key provided');
929930
}
930931

0 commit comments

Comments
 (0)