Sha256: 1dd8de3a612e2f301927cade2da494839a741b424dce061733d012a1a2d526e3

Contents?: true

Size: 526 Bytes

Versions: 2

Compression:

Stored size: 526 Bytes

Contents

module AnnotatorStore
  class ApplicationController < ActionController::Base
    before_action :set_headers

    private

    def set_headers
      headers['Access-Control-Allow-Origin'] = '*'
      headers['Access-Control-Expose-Headers'] = 'ETag'
      headers['Access-Control-Allow-Methods'] = 'GET, POST, PATCH, PUT, DELETE, OPTIONS, HEAD'
      headers['Access-Control-Allow-Headers'] = '*,x-requested-with,Content-Type,If-Modified-Since,If-None-Match'
      headers['Access-Control-Max-Age'] = '86400'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
annotator_store-1.0.0 app/controllers/annotator_store/application_controller.rb
annotator_store-1.0.0.pre app/controllers/annotator_store/application_controller.rb