lib/sampler/cors_helper.rb
#
# If this is a preflight OPTIONS request, then short-circuit the
# request, return only the necessary headers and return an empty
# text/plain.
#
If this is a preflight OPTIONS request, then short-circuit the
request, return only the necessary headers and return an empty
text/plain.
If this is a preflight OPTIONS request then short - circuit the request return only the necessary headers and return an empty text / plain .
def cors_preflight_check
    headers[CORS_HEADER_ALLOW_ORIGIN] = request.headers[CORS_HTTP_ORIGIN]
    CORS_PREFLIGHT_HEADERS.each do |k, v|
      headers[k] = v
    end
  end
def cors_preflight_check headers [ CORS_HEADER_ALLOW_ORIGIN ] = request . headers [ CORS_HTTP_ORIGIN ] CORS_PREFLIGHT_HEADERS . each do | k , v | headers [ k ] = v end end
If this is a preflight OPTIONS request, then short-circuit the
request, return only the necessary headers and return an empty
text/plain.
If this is a preflight OPTIONS request then short - circuit the request return only the necessary headers and return an empty text / plain .