@trillet-ai/web-sdk 1.2.6 → 1.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +3 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -44,11 +44,13 @@ export class TrilletAgent extends EventEmitter {
44
44
  const response = await fetch(TRILLET_API_URL, {
45
45
  method: 'POST',
46
46
  mode: 'cors',
47
+ credentials: 'omit', // Don't send credentials since this is an API key based auth
47
48
  headers: {
48
49
  'Content-Type': 'application/json',
49
50
  'Accept': 'application/json',
50
51
  'x-workspace-id': this.config.workspaceId,
51
- 'x-api-key': this.config.apiKey
52
+ 'x-api-key': this.config.apiKey,
53
+ 'Origin': typeof window !== 'undefined' ? window.location.origin : '*'
52
54
  },
53
55
  body: JSON.stringify({
54
56
  agentId: this.config.agentId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trillet-ai/web-sdk",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "description": "Trillet Web SDK for real-time audio communication with AI agents",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",