Skip to content

Commit

Permalink
Allow localhost requests from mainnet for testing purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
asiia-trilitech committed Dec 3, 2024
1 parent 1cecc29 commit 7dc21d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/embed-iframe-mainnet/vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"headers": [
{
"key": "Content-Security-Policy",
"value": "default-src 'self'; style-src 'self' https://fonts.googleapis.com 'unsafe-inline'; font-src 'self' https://fonts.gstatic.com; script-src 'self'; object-src 'none'; connect-src 'self' https://umamiwallet.com https://www.googleapis.com https://graph.facebook.com https://mainnet.ecadinfra.com https://kukai.eu.auth0.com https://fnd.web3auth.io https://*.node.web3auth.io https://*.tor.us https://prod.tcinfra.net https://api.mainnet.tzkt.io https://vitals.vercel-insights.com; img-src 'self' data:; frame-ancestors 'self' https://kanvas-poa.vercel.app https://kanvas-poa-git-poa-release-trili-tech.vercel.app"
"value": "default-src 'self'; style-src 'self' https://fonts.googleapis.com 'unsafe-inline'; font-src 'self' https://fonts.gstatic.com; script-src 'self'; object-src 'none'; connect-src 'self' https://umamiwallet.com https://www.googleapis.com https://graph.facebook.com https://mainnet.ecadinfra.com https://kukai.eu.auth0.com https://fnd.web3auth.io https://*.node.web3auth.io https://*.tor.us https://prod.tcinfra.net https://api.mainnet.tzkt.io https://vitals.vercel-insights.com; img-src 'self' data:"
}
]
}
Expand Down
8 changes: 8 additions & 0 deletions apps/embed-iframe/src/ClientsPermissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ const clientPermissions: Record<string, Permissions> = {
operations: false,
signPayload: false,
},
localhost: {
origins: [
"http://localhost:3000",
],
login: true,
operations: true,
signPayload: true,
},
};

export const getPermissionsForOrigin = (origin: string): Permissions | null => {
Expand Down

0 comments on commit 7dc21d4

Please sign in to comment.