Skip to content

Keep keyless mode with a trailing slash in the cloud API URL - #275

Open
danielgaskins wants to merge 2 commits into
firecrawl:mainfrom
danielgaskins:fix/cloud-api-trailing-slash
Open

danielgaskins wants to merge 2 commits into
firecrawl:mainfrom
danielgaskins:fix/cloud-api-trailing-slash

Conversation

@danielgaskins

@danielgaskins danielgaskins commented Sep 22, 2026 •

Copy link
Copy Markdown

What changed

isCustomApiUrl() now ignores trailing slashes when comparing an API URL with the default Firecrawl cloud URL.

This keeps https://api.firecrawl.dev/ on the same keyless and authentication paths as https://api.firecrawl.dev. Custom API URLs are still treated as custom.

I added regression coverage for URL classification, keyless mode, and API-key validation.

Testing

  • corepack pnpm run build
  • corepack pnpm exec vitest run --maxWorkers=2 --reporter=dot --silent
  • corepack pnpm run type-check
  • corepack pnpm run format:check

Fixes #274


Summary by cubic

Fixes #274: trailing slashes in the cloud API URL no longer break keyless mode.

normalizeApiUrl() strips trailing slashes from the API base URL and is now applied wherever the URL is compared or joined, so https://api.firecrawl.dev/// behaves like https://api.firecrawl.dev for both keyless request paths and API-key validation. Custom API URLs with trailing slashes are still treated as custom. Adds regression tests for URL classification, keyless request joining, and API-key validation.

Written for commit 0782f17. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files

Shadow auto-approve: would not auto-approve because issues were found.

Fix all with cubic | Re-trigger cubic

Comment thread src/utils/config.ts Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 6 files (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Shadow auto-approve: would auto-approve. Normalizes trailing slashes on API base URLs so the cloud URL with a trailing slash keeps keyless/API-key behavior. Focused bug fix with regression tests covering URL classification, keyless request joining, and validation.

Re-trigger cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trailing slash on cloud API URL disables keyless mode

1 participant