litl/leeroy — pull request #5 by charlax (2012-10-03 19:26:13+00:00)
Title: Fix SERVER_NAME when a proxy is present

The idea behind this commit is that since `SERVER_NAME` is a Flask builtin variable, it can lead to issues when using a proxy to redirect calls to leeroy.

If you put `SERVER_NAME = "127.0.0.1"`, obviously creating the hook callback URL won't work. And if you put `SERVER_NAME = "ci.whatever.com"`, Flask will return 404 for any request because it's not the adress it's serving on.