app/controllers/anoubis/application_controller.rb
##
# Generates options headers for CORS requests
# @param methods [String] list of allowed HTTP actions separated by space <i>(e.g. 'GET POST DELETE')</i>
Generates options headers for CORS requests
Generates options headers for CORS requests
def options(methods = 'POST')
    return unless check_origin
    return unless request.origin
    headers['Access-Control-Allow-Origin'] = request.headers['origin']
    headers['Access-Control-Allow-Methods'] = methods
    return if request.method != 'OPTIONS'
    headers['Access-Control-Max-Age'] = '1000'
    headers['Access-Control-Allow-Headers'] = '*,x-requested-with,Content-Type,Authorization'
  end
def options ( methods = 'POST' ) return unless check_origin return unless request . origin headers [ 'Access-Control-Allow-Origin' ] = request . headers [ 'origin' ] headers [ 'Access-Control-Allow-Methods' ] = methods return if request . method != 'OPTIONS' headers [ 'Access-Control-Max-Age' ] = '1000' headers [ 'Access-Control-Allow-Headers' ] = '*,x-requested-with,Content-Type,Authorization' end
Generates options headers for CORS requests
Generates options headers for CORS requests
methods
list of allowed HTTP actions separated by space 
list of allowed HTTP actions separated by space