I don't think it is related with appimage. I use tar.gz version, I get Bad GateWay error too. I renamed my extensions folder to reset SMath I couldn't download plugins again.
I tried same steps with a Windows laptop. It could download plugins with no problem. Issue is either Linux, Mono or smath server is rejecting either of them.