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
Copy file name to clipboardExpand all lines: README.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
This library provides convenient access to the Groq REST API from server-side TypeScript or JavaScript.
6
6
7
-
The REST API documentation can be found [on console.groq.com](https://console.groq.com/docs). The full API of this library can be found in [api.md](api.md).
7
+
The REST API documentation can be found on [console.groq.com](https://console.groq.com/docs). The full API of this library can be found in [api.md](api.md).
8
8
9
9
It is generated with [Stainless](https://www.stainlessapi.com/).
10
10
@@ -329,6 +329,18 @@ The following runtimes are supported:
329
329
- Vercel Edge Runtime.
330
330
- Jest 28 or greater with the `"node"` environment (`"jsdom"` is not supported at this time).
331
331
- Nitro v2.6 or greater.
332
+
- Web browsers: disabled by default to avoid exposing your secret API credentials. Enable browser support by explicitly setting `dangerouslyAllowBrowser` to true'.
333
+
<details>
334
+
<summary>More explanation</summary>
335
+
### Why is this dangerous?
336
+
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,
337
+
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.
338
+
### When might this not be dangerous?
339
+
In certain scenarios where enabling browser support might not pose significant risks:
340
+
- 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.
341
+
- 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.
342
+
- 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.
343
+
</details>
332
344
333
345
Note that React Native is not supported at this time.
0 commit comments