The correct fix is
https://github.com/discourse/discourse/pull/37177
but it’s too big a change than I’m confortable merging at this point ![]()
Instead, I’m going to fix each “endpoints” one by one to make it simpler to review and less risky.
Here’s first step