Skip to content

adamgamble/submariner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Submariner

Easy wildcard subdomains in rails

Basically this run a block and pass the subdomain to it so you can do interesting things like load a user based on subdomain etc.

Submariner::WildCardSubdomain.config do |config|
  config.subdomains_to_ignore = ["www"] #Don't run the block for these domains
  config.subdomain_block = lambda { |subdomain| Rails.logger.warn "Subdomain block ran for #{subdomain}" } #Do something everytime a domain is detected
end

This project rocks and uses MIT-LICENSE.

About

Easy wildcard domains with rails

Resources

License

Stars

Watchers

Forks

Packages

No packages published