Sha256: 5e75b1f117dcd2610fe303871b8f14cceb82f190d5b56d262cb57d509627d796
Contents?: true
Size: 990 Bytes
Versions: 2
Compression:
Stored size: 990 Bytes
Contents
# Cors Config Middleware that allows you to configure CORS via a YAML file. ## Installation Add this line to your application's Gemfile: ```ruby gem 'cors-config' ``` And then execute: $ bundle Or install it yourself as: $ gem install cors-config ## Usage Default configuration location and name is $ROOT/config/cors.yml. In config.ru ``` use Cors::Config use Cors::Config, 'config/my_config.yml' ``` Also the configuration is expected in config/cors.yml (for now). ``` cors: products: origins: '*' resource: '/products' headers: 'any' methods: 'any' status: origins: '*' resource: '/status' headers: 'any' methods: 'any' ``` ## Contributing Please send feedback and comments to the author at: Dane-Garrin Balia <dane.balia@hetzner.co.za> This gem is sponsored by Hetzner (Pty) Ltd - http://hetzner.co.za ## License The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cors-config-0.2.4 | README.md |
cors-config-0.2.3 | README.md |