@riking, that did it, thanks a lot. Somewhere along the line I’d commented out my X-Forwarded-For line, for whatever reason.
Thanks also for your excellent link! There’re so many Discourse+nginx pages on this forum (and on the Internet), that it’s good to have a reference one.