Charlan Bettiol
04/11/2024, 1:43 PMexport const ExampleFetchComponent = () => {
const classes = useStyles();
const { value, loading, error } = useAsync(async () => {
// Simulação de uma chamada assíncrona para obter a URL do iframe
// Você pode substituir isso por sua lógica real
const url = '<http://localhost:9292/>';
return url;
}, []);
if (loading) {
return <Progress />;
} else if (error) {
return <ResponseErrorPanel error={error} />;
}
// Renderizar o iframe
return (
<div className={classes.iframeContainer}>
<iframe
className={classes.iframe}
src="<http://localhost:9292/>"
title="Iframe Example"
allow="fullscreen"
/>
</div>
);
};Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Charlan Bettiol
04/12/2024, 12:28 PMX-Frame-Options: ALLOW-FROM <https://backstage.mycorp.intranet/>Charlan Bettiol
04/12/2024, 5:02 PMContent-Security-Policy: frame-ancestors * header and it worked inside the iframe, thank you very muchMatt (pactflow.io / pact-js / pact-go)
x-frame-options is deprecated, and the CSP headers is a better way to go. Glad you could sort it out!