0.02
No commit activity in last 3 years
No release in over 3 years
Rack middleware to route requests with subdomains to specified routes with substitutions
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.11
~> 0.6
>= 0
>= 0

Runtime

~> 0.8.0
>= 1.2
 Project Readme

rack-subdomain

Rack middleware to transparently route requests with a subdomain to a specified path with substitutions.

Usage

Gemfile

gem 'rack-subdomain'

config.ru

# Simple Example

use Rack::Subdomain, "example.com", to: "/users/:subdomain"

# Complex Example
use Rack::Subdomain, "example.com", except: ['', 'www', 'secure'] do
  map 'downloads', to: "/downloads/:subdomain"
  map '*', to: "/users/:subdomain"
end

Contact

Mattt

License

rack-subdomain is available under the MIT license. See the LICENSE file for more info.