Skip to content

A Ruby Gem to handle subdomains on xip.io / nip.io domains using a rack middleware

License

Notifications You must be signed in to change notification settings

WeAreFarmGeek/tld_length

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TldLength

Reconfigures ActionDispatch's TLD handling dynamically based on the request host, so you don't have to mess with config.action_dispatch.tld_length for cross-device testing using xip.io and friends

Heavily based on Tim Lucas' Gist.

Installation:

The simplest way to use Rack::TldLength is to use Bundler.

Add Rack::TldLength to your Gemfile:

gem 'tld_length'

Usage

Add the following line to your config/environments/development.rb:

config.middleware.use Rack::TldLength, /(x|n)ip\.io/, 5

And you're done!

About

A Ruby Gem to handle subdomains on xip.io / nip.io domains using a rack middleware

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages