Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

983 B
Raw Blame
import cx from "classnames";
import { jt, t } from "ttag";

import { ExternalLink } from "metabase/common/components/ExternalLink";
import CS from "metabase/css/core/index.css";
import { AdminSettingInput } from "metabase/settings-components";

const Description = () => {
  return jt`Enter the origins for the websites or web apps where you want to allow embedding, separated by a space. Here are the ${(
    <ExternalLink
      key="specs"
      href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors"
      className={cx(CS.textBold, CS.link)}
    >
      {t`exact specifications`}
    </ExternalLink>
  )} for what can be entered.`;
};

export const InteractiveEmbeddingAuthorizedOriginsWidget = () => (
  <AdminSettingInput
    name="embedding-app-origins-interactive"
    title={t`Authorized origins for full-app embedding`}
    description={<Description />}
    placeholder="https://*.example.com"
    inputType="text"
  />
);