commit links in hg rss feeds point to localhost

Matt Mackall mpm at selenic.com
Wed Aug 22 20:39:49 UTC 2012


On Tue, 2012-08-21 at 12:48 +0100, Nitrox wrote:
> The rss feeds (both rss and atom) generated by hg, links to commit point to
> localhost. I tried setting baseurl under web section in hgrc to
> hg.fanboy.co.nz and also / but it doesn't seem to have any effect.
> 
> you can see them on https://hg.fanboy.co.nz/atom-log and
> https://hg.fanboy.co.nz/rss-log
> We run nginx as frontend server with uWsgi.

I suspect this is the problem. Mercurial depends on getting the server's
address in the WSGI environment as part of the request. You seem to have
a setup where Nginx is proxying to uWSGI, so Mercurial sees uWSGI's
internal address (localhost) as the server name, not Nginx's visible
address.

This is a bit special for RSS/Atom, as the links are all absolute rather
than relative. You can either try to ensure that SERVER_NAME gets set
properly, or change all instances of '{urlbase}' in the templates to the
URL you need.

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial mailing list