The Revel site I'm working on works fine in the browser, but when hit it in the terminal via a curl, it returns a 502. Checking the error log for Revel, it throws a long panic error when hit by curl, starting like...
{"caller":"panic.go:35","error":"runtime error: index out of range","lvl":"eror","module":"revel","msg":"PanicFilter: Caught panic, unable to determine stack location","section":"util","stack":"goroutine 265...
When I access the site via the browser, no new error appears. Nginx is throwing the following error...
22393#22393: *5098 upstream prematurely closed connection while reading response header from upstream
My nginx config looks essentially like...
server {
server_name name-of-site.com;
location / {
proxy_pass http://localhost:9000;
}
}
At first I thought this was an issue with my Nginx config, but seeing I'm getting an error thrown by Go/Revel when I hit the site via curl request, I'm wondering if it's an issue with Go or Revel? Anyone had similar issues when getting a Go site running through Nginx? Thanks in advance, any direction would be useful.