Method: Qa::ApplicationController#options

Defined in:
app/controllers/qa/application_controller.rb

#optionsObject

Process the OPTIONS method for all routes

See Also:

  • definitions in /config/routes.rb


8
9
10
11
12
13
14
15
16
# File 'app/controllers/qa/application_controller.rb', line 8

def options
  unless Qa.config.cors_headers?
    head :not_implemented
    return
  end
  response.headers['Access-Control-Allow-Origin'] = '*'
  response.headers['Access-Control-Allow-Methods'] = 'GET, OPTIONS'
  head :no_content
end