Servant and 502 Bad Gateway

Hello! I’m trying to build a small rest server using Servant and I’m encountering an issue where when I make requests from my corresponding web app I get back a 502. I don’t have much experience building servers outside of simple ones using Node or Deno so I’m I’m guessing that it’s something that they do implicitly that I should be doing explicitly in Haskell. I think it might be something CORS related, but I’m not certain. Thank you for any help!

Also if it helps, I’m using elm-live for my front end dev server and its --proxy-* options for proxying to my Haskell server.

Does the backend server work correctly when you send requests directly to it?

The back end does work correctly when I send requests directly. It ended up being a cors issue. I haven’t had to deal with cors from the server side before, so that was definitely new to learn.