We're verifying your browser

I add a challenge rule for one of my api /api/download.
Now when user clicks the download, it keeps showing ‘We’re verifying your browser’ and then the app begins downloading.
But even the app downloads successfully, the message isn’t gone and stays in the Vercel’s verifying page, is this expected?

When you set up a challenge rule on /api/download , the challenge rule intercepts the request to verify it’s from a legitimate browser. However, since your API endpoint returns a file download rather than a typical web page response, the browser stays on the verification page even after the download completes successfully.

Instead of using the challenge rule on the download endpoint, you could serve downloads through a regular page that triggers the download with JS, or create a landing page to handle verification and redirect to the download. I hope that helps!

1 Like

@amyegan Exactly.
My current solution:

  1. /api/download 302 to a download page with a short lived download link
  2. still challenge the download api with firewall rule

Hope this helps others.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.