Issue with using a proxy
When running a slash command, I've observed an error at the following line:
await interaction.deferReply({ephemeral});
Error:
I'm proxying all discord requests through a proxy and I have 2 proxies available, one works, one doesn't. The differences between the two are:
Working proxy:
HTTP only, not HTTPS (Slightly modified djs for this to allow http proxies to work)
direct ip:port -> proxy
Failing proxy:
Forced HTTPS + HSTS (Modifications removed as https proxies are supported out of the box)
Domain name -> Cloudflare (+ WAF) -> nginx -> proxy
Normal commands work perfectly fine, this error only occurs on interaction.deferReply()
and probably other interaction related requests as well, however I havent tested that aside from deferReply8 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Node is v18.12.1 and Discord.js is v13.13.1, same issue occurs on v13.12.0
v14 seems to have fixed this?
At least thats what i found on github, seems there the possibility of headers being null is taken into account, how come this isnt the case on v13? Should i apply a patch for this manually or
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Yeah id like an actual fix on v13
i dont have the time to update to 14 rn
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Anyone able to help me with this?
Sure about that?

Seeing as the error im having seems(?) to have been fixed in v14, and v13 is still being supported, i think a backport of that fix would be reasonable
Seems that a single
?
in discord.js fixed the issue, will be testing it a little more extensively later tonight
i guess ill open a pr if i dont encounter any other issues