Project

tld_length

0.0
No commit activity in last 3 years
No release in over 3 years
Handle subdomains on xip.io / nip.io domains using a rack middleware
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 10.0
 Project Readme

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!