mirror of
https://github.com/penpot/penpot-plugins.git
synced 2025-01-06 14:50:21 -05:00
fix(runtime): prevent use api credentials
This commit is contained in:
parent
0eadac1e75
commit
1699e6dedb
1 changed files with 8 additions and 1 deletions
|
@ -35,7 +35,14 @@ export const ɵloadPlugin = async function (manifest: Manifest) {
|
|||
|
||||
const c = new Compartment({
|
||||
penpot: harden(pluginApi),
|
||||
fetch: window.fetch.bind(window),
|
||||
fetch: harden((...args: Parameters<typeof fetch>) => {
|
||||
const requestArgs: RequestInit = {
|
||||
...args[1],
|
||||
credentials: 'omit',
|
||||
};
|
||||
|
||||
return fetch(args[0], requestArgs);
|
||||
}),
|
||||
console: harden(window.console),
|
||||
Math: harden(Math),
|
||||
setTimeout: harden(
|
||||
|
|
Loading…
Reference in a new issue