fix: allow same-origin iframe paths
This commit is contained in:
1 parent
16e437decc
commit
254438247e
3 files changed
+24
-5
No files matched your search
@@ -1,8 +1,8 @@
|
||||
import { IconBrowser, IconExternalLink } from "@tabler/icons-react";
|
||||
|
||||
import { createWidgetDefinition } from "../definition";
|
||||
import { getSafeApplicationUrl } from "../common/application-url";
|
||||
import { optionsBuilder } from "../options";
|
||||
import { getSafeIframeUrl } from "./url";
|
||||
|
||||
const createOptions = () =>
|
||||
optionsBuilder.from((factory) => ({
|
||||
@@ -23,7 +23,7 @@ export const { definition, componentLoader } = createWidgetDefinition("iframe",
|
||||
supportsAdvancedFocus: false,
|
||||
icon: IconBrowser,
|
||||
contextActions: ({ options }) => {
|
||||
const embedUrl = getSafeApplicationUrl(options.embedUrl);
|
||||
const embedUrl = getSafeIframeUrl(options.embedUrl);
|
||||
return embedUrl
|
||||
? [
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user