You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When I use the anthropic API I get this error:
{"type":"error","error":{"type":"authentication_error","message":"CORS requests must set 'anthropic-dangerous-direct-browser-access' header"}}
Desktop (please complete the following information):
OS: Windows
Browser : Edge
I looked into anthropic's documentation to see what it was about and found this:
The anthropic-dangerous-direct-browser-access header is automatically added when using the dangerouslyAllowBrowser option in the TypeScript SDK (1) . Here's how to enable it:
Note that enabling browser support is considered dangerous because it could expose your secret API credentials in client-side code (2) . Web browsers are inherently less secure than server environments, as any user with access to the browser can potentially inspect, extract, and misuse these credentials .
Some scenarios where enabling browser support might be acceptable include :
Internal tools used within a controlled environment with trusted users
Development or debugging purposes with temporary/frequently rotated credentials
The text was updated successfully, but these errors were encountered:
Describe the bug
When I use the anthropic API I get this error:
{"type":"error","error":{"type":"authentication_error","message":"CORS requests must set 'anthropic-dangerous-direct-browser-access' header"}}
Desktop (please complete the following information):
I looked into anthropic's documentation to see what it was about and found this:
The
anthropic-dangerous-direct-browser-access
header is automatically added when using thedangerouslyAllowBrowser
option in the TypeScript SDK (1) . Here's how to enable it:Note that enabling browser support is considered dangerous because it could expose your secret API credentials in client-side code (2) . Web browsers are inherently less secure than server environments, as any user with access to the browser can potentially inspect, extract, and misuse these credentials .
Some scenarios where enabling browser support might be acceptable include :
The text was updated successfully, but these errors were encountered: