Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Easily add Access-Control headers with a handy middleware
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
.gitignore
Changelog.markdown
Readme.markdown
access_control.gemspec
init.rb

Readme.markdown

Access Control

Access-Control headers are important. If you are doing stuff like embedding fonts with @font-face and you want to use them on another domain than your app, it won't work in several browsers (Firefox being the main one). This gem provides some middleware to solve this. Simply include it in any environments you want Access Control do it's thing like this:

config.middleware.insert_before ActionDispatch::Static, "AccessControl::Middleware"

Currently all of the options are predefined. Eventually, I'd like to add a way to provide more fine-grain control.

Something went wrong with that request. Please try again.