Putting a discourse development server behind proxy seems to mess up some (but not most) URLs

I’m not using Vagrant; I’m just running it like I run any other rails app.

It really doesn’t make sense to me that most links / URLs work fine. There really must be some differences in how the links are generated. I think this is at least weird if not a bug.

This setup came up because I was quickly trying to prototype having nginx in front of Discourse. I will try it in a production setup to see if that solves my problem.