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=defaultSteps to reproduce
- Add a webhook in a Fluxer channel
- Go to any webpage
- Open browser console
- 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 ) }) - Get an error
- (Optional) refresh the page, replace with discord webhook link, and run again

3 comments
Comment by Rex
Comment by @PilkeySEK
web.fluxer.app/api/...?Comment by @mailbun