@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.
- package/dist/index.js +3 -1
- 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,
|