Skip to content

Commit 7fc2196

Browse files
authored
Merge pull request #842 from digirati-co-uk/hotfix/fix-cors-embeded
add allow same origin on embeded item
2 parents daef052 + 4ace4e5 commit 7fc2196

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

Diff for: CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
### Fixed
1616
- Fixed block editor button 'saved' instead of 'save' (MAD-1475)
1717
- Fixed marking canvas as incomplete not marking manifest as incomplete (MAD-1516)
18+
- Fixed CORS errors in embed item block
1819

1920
## [v2.2.7](https://github.com/digirati-co-uk/madoc-platform/compare/v2.2.6...v2.2.7)
2021

Diff for: services/madoc-ts/src/frontend/site/blocks/EmbedItem.tsx

+9-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,14 @@ export const EmbedItem: React.FC<{
1414
}> = ({ link, height, width }) => {
1515
return (
1616
<EmbedWrapper>
17-
<iframe src={link} height={height} width={width} loading="lazy" referrerPolicy="no-referrer" sandbox="allow-scripts" />
17+
<iframe
18+
src={link}
19+
height={height}
20+
width={width}
21+
loading="lazy"
22+
referrerPolicy="no-referrer"
23+
sandbox="allow-scripts allow-same-origin"
24+
/>
1825
</EmbedWrapper>
1926
);
2027
};
@@ -30,7 +37,7 @@ blockEditorFor(EmbedItem, {
3037
width: '400',
3138
},
3239
editor: {
33-
link: { type: 'text-field', label: 'src or link' },
40+
link: { type: 'text-field', label: 'src or link', description: 'paste an embed src/link without quotes' },
3441
height: { type: 'text-field', label: 'height (px)' },
3542
width: { type: 'text-field', label: 'width (px)' },
3643
},

Diff for: services/madoc-ts/translations/en/madoc.json

+1
Original file line numberDiff line numberDiff line change
@@ -1190,6 +1190,7 @@
11901190
"secondButton": "secondButton",
11911191
"secondButtonLink": "secondButtonLink",
11921192
"size": "size",
1193+
"some help text": "some help text",
11931194
"src or link": "src or link",
11941195
"summary": "summary",
11951196
"switch to the main revision": "switch to the main revision",

0 commit comments

Comments
 (0)