Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add tld_length setting, default to 1

  • Loading branch information...
commit 0286491d4d3ce558e25d7df1a19797953add1348 1 parent 65156a2
@akahn authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/sinatra/subdomain.rb
View
4 lib/sinatra/subdomain.rb
@@ -7,6 +7,10 @@ def subdomain(host, &block)
condition { subdomain == request.env['HTTP_HOST'].split('.').first }
block.call(subdomain)
end
+
+ def self.registered(app)
+ app.set :tld_length, 1
+ end
end
register Subdomain
Please sign in to comment.
Something went wrong with that request. Please try again.