No commit activity in last 3 years
No release in over 3 years
A simple gem to protect an application from search engine cache
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
~> 3.2
>= 0
 Project Readme

StagingProtection

A simple gem is desinged to hide staging apps from search engines and public access.

Installation

Add this line to your application's Gemfile:

gem 'staging_protection'

And then execute:

$ bundle

Or install it yourself as:

$ gem install staging_protection

Then run:

$ rake staging_protection:initialize

Or create config file manualy.

Usage

Set up your credentials in config file. Don't forget to restart web server. And that's it. Open http://localhost:3000 (or your site url) and you'll see it is forbidden.

Once use http://localhost:3000/?pass=<your password from config>. Now you can walk trough your site without any password. Token is stored in cookies.

Customizing access

You can add an exclision conditions. For example, you don't want to protect action main from HomeController. This is very easy. Set method protection_exclusion to your HomeController.

def protection_exclusion
    params[:action] == 'main'
end

And here you are. Action main is not blocked now.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request