Appears that you have a very custom setup with a proxy in the middle.
That is not standard Discourse behavior, so it looks like this is caused by your special proxy thing.
Maybe there is a special Header you can send to bypass the proxy? Gotta check with that product docs.