500 error from server functions when using getRequestHeaders in production with Bun
This works fine locally, but when deploying it to my VPS (using coolify), all calls are coming back with a 500 status code. Some requests also say "Only HTML requests are supported here". I saw someone else's question and it seems they had a rewrite in their AWS config, but I don't see anything that could be causing this in my setup (perhaps coolify is doing something weird behind the scenes)
When I don't include getRequestHeaders() I do get back other status codes like 401 though, but the 500 errors definitely are not coming from the API.
I'm on version 1.132.51. I've tried deploying with Nitro v3, v2, and the custom bun server file.
Anyone have any idea why this might be happening?