No commit activity in last 3 years
No release in over 3 years
Rack middleware to redirect requests to the main domain in your app.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0
 Project Readme

Rack::WwwEnforcer

Rack Middleware for redirect requests to an specific subdomain of your app. (Ex. http://mysite.com to http://app.mysite.com)

Usage

use Rack::WwwEnforcer, :subdomain => "app"

If subdomain isn't present "www" is used by default.

You can use it in your Rails app, in the environment configuration file add it to Middleware stack:

config.middleware.insert_before ActionDispatch::Static, Rack::WwwEnforcer