Http Request working in Browser and with curl but not in Flutter or Postman

I am making a flutter app and i am using an express.js Backend. I set it up and it works fine when using it on localhost but not when deploying it to an ubuntu server. Postman then just instantly says “Socket hang up”. When using curl or putting it into the browser everything just works fine. Any ideas what could be wrong?