Commit a6a4d4fe authored by Yuri Mikhin's avatar Yuri Mikhin

Add allow attribute to iframe in the marketplace.

parent 95d1bcbb
...@@ -27,6 +27,8 @@ const MarketplaceApp = ({ app, isLoading }: Props) => { ...@@ -27,6 +27,8 @@ const MarketplaceApp = ({ app, isLoading }: Props) => {
'allow-same-origin allow-scripts ' + 'allow-same-origin allow-scripts ' +
'allow-top-navigation-by-user-activation'; 'allow-top-navigation-by-user-activation';
const allowAttributeValue = 'clipboard-read; clipboard-write';
useEffect(() => { useEffect(() => {
if (app && !isFrameLoading) { if (app && !isFrameLoading) {
ref?.current?.contentWindow?.postMessage({ blockscoutColorMode: colorMode, blockscoutChainId: network?.chainId }, app.url); ref?.current?.contentWindow?.postMessage({ blockscoutColorMode: colorMode, blockscoutChainId: network?.chainId }, app.url);
...@@ -46,6 +48,7 @@ const MarketplaceApp = ({ app, isLoading }: Props) => { ...@@ -46,6 +48,7 @@ const MarketplaceApp = ({ app, isLoading }: Props) => {
{ app && ( { app && (
<Box <Box
allow={ allowAttributeValue }
ref={ ref } ref={ ref }
sandbox={ sandboxAttributeValue } sandbox={ sandboxAttributeValue }
as="iframe" as="iframe"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment