Skip to content

Commit 54421d7

Browse files
x5astainless-app[bot]
authored andcommitted
docs(readme): update formatting and clarity for CORS flag
1 parent e91d291 commit 54421d7

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -418,17 +418,18 @@ The following runtimes are supported:
418418
- Vercel Edge Runtime.
419419
- Jest 28 or greater with the `"node"` environment (`"jsdom"` is not supported at this time).
420420
- Nitro v2.6 or greater.
421-
- Web browsers: disabled by default to avoid exposing your secret API credentials. Enable browser support by explicitly setting `dangerouslyAllowBrowser` to true'.
421+
- Web browsers: disabled by default to avoid exposing your secret API credentials (see our help center for [best practices](https://support.anthropic.com/en/articles/9767949-api-key-best-practices-keeping-your-keys-safe-and-secure)). Enable browser support by explicitly setting `dangerouslyAllowBrowser` to `true`.
422422
<details>
423-
<summary>More explanation</summary>
424-
### Why is this dangerous?
425-
Enabling the `dangerouslyAllowBrowser` option can be dangerous because it exposes your secret API credentials in the client-side code. Web browsers are inherently less secure than server environments,
423+
<summary><b>More explanation</b></summary>
424+
<h3>Why is this dangerous?</h3>
425+
Enabling the <code>dangerouslyAllowBrowser</code> option can be dangerous because it exposes your secret API credentials in the client-side code. Web browsers are inherently less secure than server environments,
426426
any user with access to the browser can potentially inspect, extract, and misuse these credentials. This could lead to unauthorized access using your credentials and potentially compromise sensitive data or functionality.
427-
### When might this not be dangerous?
427+
<h3>When might this not be dangerous?</h3>
428428
In certain scenarios where enabling browser support might not pose significant risks:
429-
- Internal Tools: If the application is used solely within a controlled internal environment where the users are trusted, the risk of credential exposure can be mitigated.
430-
- Public APIs with Limited Scope: If your API has very limited scope and the exposed credentials do not grant access to sensitive data or critical operations, the potential impact of exposure is reduced.
431-
- Development or debugging purpose: Enabling this feature temporarily might be acceptable, provided the credentials are short-lived, aren't also used in production environments, or are frequently rotated.
429+
<ul>
430+
<li>Internal Tools: If the application is used solely within a controlled internal environment where the users are trusted, the risk of credential exposure can be mitigated.</li>
431+
<li>Development or debugging purpose: Enabling this feature temporarily might be acceptable, provided the credentials are short-lived, aren't also used in production environments, or are frequently rotated.</li>
432+
</ul>
432433
</details>
433434

434435
Note that React Native is not supported at this time.

0 commit comments

Comments
 (0)