I’m not sure what it happening in your environment:
the first request is made using directly the API? or you have a way to reproduce the error using the UI?
the second error, is made using the API? or you did change something to make the request have the ref param?
do you have some docker logs that may help to understand the error?
The dual proxy situation is expected; it’s not the only way to serve Taiga and you may want your own configurations, but you should know about nginx, exposing ports in docker, etc.
I had the same problem and I found the culprit. It was the addon ClearURLs that deleted the ref parameter. After disabling the addon (it doesn’t have whitelist ): ) I was able to use Taiga normally.
If anyone face the same problem and has the addon, disable it!