← All fixes
Browser call to Anthropic API blocked by CORS
#12Error
Access to fetch at 'https://api.anthropic.com/v1/messages' from origin ... has been blocked by CORS policy.
Fix
The Anthropic API only allows browser calls if you send the header anthropic-dangerous-direct-browser-access: true. Only do that when the user supplies their own API key. If your app owns the key, never ship it to the browser: call the API from a serverless function (Vercel API route) that reads the key from an env var.
Did it work?
No reports yet0 worked0 didn't
Tried it yourself?
Related fixes
Vercel CLI hangs on 'Waiting for terms acceptance in browser'
#16vercel integration add neon: Opening browser for terms acceptance. Waiting for terms acceptance in browser...
Supabase table readable by anyone with the anon key
#2Data in a Supabase table can be fetched from the browser with only the public anon key, no login.
create-next-app fails: name can no longer contain capital letters
#8Could not create a project called "MyApp" because of npm naming restrictions: name can no longer contain capital letters