xxxxxxxxxx
<iframe></iframe>
<script>
async function getSrc() {
const res = await fetch("http://example.com/someiframe", {
method: 'GET',
headers: {
// Here you can set any headers you want
}
});
const blob = await res.blob();
const urlObject = URL.createObjectURL(blob);
document.querySelector('iframe').setAttribute("src", urlObject)
}
getSrc();
</script>