Skip to content

Commit

Permalink
fix(extension): fix manifest file for development
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-barros committed May 29, 2023
1 parent 6996a8d commit d695b72
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/browser-extension-wallet/manifest.json
Expand Up @@ -19,7 +19,7 @@
"permissions": ["webRequest", "storage", "tabs", "unlimitedStorage"],
"host_permissions": ["<all_urls>"],
"content_security_policy": {
"extension_pages": "default-src 'self' $LOCALHOST; frame-src https://connect.trezor.io/; script-src 'self' 'wasm-unsafe-eval' $LOCALHOST; font-src 'self' https://use.typekit.net; object-src 'self'; connect-src $CARDANO_SERVICES_URLS https://api.coingecko.com https://analyticsv2.muesliswap.com $LOCALHOST https://matomo.cw.iog.io/ https://use.typekit.net; style-src * 'unsafe-inline'; img-src * data:;"
"extension_pages": "default-src 'self' $LOCALHOST_DEFAULT_SRC; frame-src https://connect.trezor.io/; script-src 'self' 'wasm-unsafe-eval' $LOCALHOST_SCRIPT_SRC; font-src 'self' https://use.typekit.net; object-src 'self'; connect-src $CARDANO_SERVICES_URLS https://api.coingecko.com https://analyticsv2.muesliswap.com $LOCALHOST_CONNECT_SRC https://matomo.cw.iog.io/ https://use.typekit.net; style-src * 'unsafe-inline'; img-src * data:;"
},
"content_scripts": [
{
Expand Down
4 changes: 3 additions & 1 deletion apps/browser-extension-wallet/webpack-utils.js
Expand Up @@ -6,8 +6,10 @@ const transformManifest = (content, env, mode) => {
'$CARDANO_SERVICES_URLS',
`${env.CARDANO_SERVICES_URL_MAINNET} ${env.CARDANO_SERVICES_URL_PREPROD} ${env.CARDANO_SERVICES_URL_PREVIEW}`
)
.replace(/\$LOCALHOST_DEFAULT_SRC/g, mode === 'development' ? 'http://localhost:3000' : '')
.replace(/\$LOCALHOST_SCRIPT_SRC/g, mode === 'development' ? 'http://localhost:3000' : '')
.replace(
/\$LOCALHOST/g,
/\$LOCALHOST_CONNECT_SRC/g,
mode === 'development'
? 'http://localhost:3000 http://localhost:3001 http://localhost:8080 ws://localhost:3000 ws://0.0.0.0:3000/ws wss://localhost:3000 ws://localhost:3001 ws://0.0.0.0:3001/ws wss://localhost:3001'
: ''
Expand Down

0 comments on commit d695b72

Please sign in to comment.