Skip to content

Commit 96d3934

Browse files
Update customjs.app.mjs
1 parent 66e6ead commit 96d3934

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

components/customjs/customjs.app.mjs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,26 @@ export default {
1111
},
1212
},
1313
methods: {
14+
_getBaseHeaders() {
15+
return {
16+
"Content-Type": "application/json",
17+
"customjs-origin": "pipedream",
18+
};
19+
},
1420
_makeRequest(opts = {}) {
1521
const {
1622
$ = this,
17-
headers,
23+
headers = {},
1824
...otherOpts
1925
} = opts;
26+
2027
return axios($, {
2128
...otherOpts,
2229
method: "POST",
2330
url: `https://e.customjs.io/__js1-${this.$auth.api_key}`,
2431
headers: {
32+
...this._getBaseHeaders(),
2533
...headers,
26-
"Content-Type": "application/json",
27-
"customjs-origin": "pipedream",
2834
},
2935
responseType: "arraybuffer",
3036
});

0 commit comments

Comments
 (0)