a) AFAIK nginx outside of container is recommended
b) It should be tailor-made to what discourse requires
So, yes I see it as discourse related problem.
Is this really true and recommended practice?
The rate limit template templates/web.ratelimited.template.yml should be removed from the docker config and the rate limit should then be configured in the outer nginx instance instead.