我正在尝试将超集集成到我的应用程序中,但我不能,因为我遇到了这个错误,该错误与框架有关,而我在代码中没有使用框架,这是代码:
import { useSelector } from "react-redux";
import { authSelector } from "../../../redux/slices/auth";
import { embedDashboard } from "@superset-ui/embedded-sdk";
import { useEffect } from "react";
function SupersetDashboard({ token }) {
const { company } = useSelector(authSelector);
useEffect(() => {
if (!token) return;
embedDashboard({
id: "49271a6d-182b-4761-9e6c-bf2c51bd1be2",
supersetDomain: "https://dashboard.munjz.com/",
mountPoint: document.getElementById("superset-iframe"),
fetchGuestToken: () => token,
dashboardUiConfig: {
hideTitle: true,
hideChartControls: true,
hideTab: true,
},
rls: [{ clause: `company_id = ${company.id}` }],
});
}, []);
return <div id="superset-iframe"></div>;
}
export default SupersetDashboard;
这是错误:
Refused to display 'https://dashboard.munjz.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
这是为了在我的网页中显示数据