rack-no-www
rack-no-www copied to clipboard
Rack middleware for redirecting 'www' requests
I followed suit of rack-ssl-enforcer by adding an `:only_hosts` option.
see commit message
Logging
writes a log to STDOUT when a redirect happens i could possibly make this optional via a configuration setting, but i think it's perfectly fine as-is.
stripped trailing whitespace, and put code example into fenced code block, for pretty syntax highlighting on github