Improve detection of local site #1

Merged
merged 1 commit into from May 5, 2012

Conversation

Projects
None yet
2 participants
Contributor

tnorthcutt commented May 4, 2012

On my local machine, I edit my hosts file and create a VirtualHost entry in httpd-vhosts.conf, so SERVER_NAME is never localhost or 127.0.0.1 for me. This commit checks to see if SERVER_ADDR is 127.0.0.1, which is in fact true in my situation. I'm not certain this is the best method of detecting whether this is running on a 'local' site - thoughts?

Owner

michael-martin commented May 5, 2012

Thanks for the pull request. Increased compatibility has to be better. Your addition will still never be true for a production site, and no db calls needed, so let's add it. Thanks! :)

michael-martin merged commit c00e975 into michael-martin:master May 5, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment