buggregator / frontend

Buggregator UI
https://buggregator.dev/
14 stars 8 forks source link

Add auth support for SMTP module #121

Closed butschster closed 4 months ago

butschster commented 4 months ago
  1. Content in iframe cannot be loaded with authentication
  2. Attachments cannot be dowloaded

We can load body into iframe something like this

<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>