Skip to content

Instantly share code, notes, and snippets.

@geronimod
Created March 18, 2014 18:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geronimod/9626512 to your computer and use it in GitHub Desktop.
Save geronimod/9626512 to your computer and use it in GitHub Desktop.
cors
class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
after_action :cors
layout false
def cors
headers['Access-Control-Allow-Origin'] = '*'
end
def vast
render file: "public/vast"
end
def wrapper
send_file "public/YuMeVPAIDWrapper.swf", type: 'application/x-shockwave-flash', disposition: 'inline'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment