Commit 1d9c1ff0 authored by Michael Rose's avatar Michael Rose

cors 2

parent a2c88d93
class Api::V1::StoriesController < ApplicationController
include Cors
skip_before_action :verify_authenticity_token
before_action :set_story, only: [:show]
before_action :cors_preflight_check
after_action :cors_headers
......
......@@ -16,4 +16,8 @@ module Cors
headers['Access-Control-Allow-Methods'] = 'DELETE, GET, HEAD, PATCH, PUT, POST, OPTIONS'
headers['Access-Control-Max-Age'] = '1728000'
end
def render_200
head 200, content_type: 'application/json'
end
end
\ No newline at end of file
......@@ -18,11 +18,6 @@ class PensieveController < ApplicationController
protected
def render_200
head 200, content_type: 'application/json'
end
def is_page_load?
params['event_name'] == 'chapter_load'
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment