Cannot send webhooks to Fluxer via client-side JS

(#322) Bug Awaiting confirmation api

Summary

I have my own static web app that uses client-side JavaScript to send messages via webhooks. It supports Discord, and I wanted to see if it could also support Fluxer, but I get CORS-related errors when trying to send anything to Fluxer. I assume it's related to how Fluxer seemingly doesn't add CORS Access-Control-Allow-Origin header in webhook responses, and Discord seemingly does, see https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS/Errors/CORSMissingAllowOrigin?utm_source=devtools&utm_medium=firefox-cors-errors&utm_campaign=default

Steps to reproduce

  1. Add a webhook in a Fluxer channel
  2. Go to any webpage
  3. Open browser console
  4. Paste and run this minimal example (replacing webhook url)
    var webhookUrl = 'https://api.fluxer.app/webhooks/ID_HERE/KEY_HERE'; // Replace with your webhook URL
    
    var payload = {
      content: 'Hello from browser console!',
      username: 'Console Tester',
      embeds: [
        {
          title: 'Test Embed',
          description: 'This is a simple test message.'
        }
      ]
    };
    
    fetch(webhookUrl, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify(payload)
    })
  5. Get an error
  6. (Optional) refresh the page, replace with discord webhook link, and run again

Environment (optional)

Browser: Mozilla Firefox

Logs or screenshots (optional)

image Learn more leads to docs page I linked in summary
  • 554948357-e51ee1b2-3230-4155-ae87-e77adeb5d9e1.png

    554948357-e51ee1b2-3230-4155-ae87-e77adeb5d9e1.png

    856×145 | 52 kB

3 comments

Sign in with Fluxer to comment and vote.
Comment by Rex
RexSystem 1 vote
Status changed from Fixed to Awaiting confirmation
This was closed in a bulk cleanup before Fluxer V2 without being checked or fixed. It may work now, so it is waiting for someone to confirm whether the bug still happens.
Comment by @PilkeySEK
RexSystem 1 vote originally by @PilkeySEK on GitHub
Have you tried web.fluxer.app/api/...?
Comment by @mailbun
RexSystem 1 vote originally by @mailbun on GitHub OP
That doesn't seem to make any difference for me.