Module: Sinatra::CrossOriginHandler

Extended by:
Hexacta
Defined in:
lib/sinatra/handlers/cross_origin.rb

Constant Summary

Constants included from Hexacta

Hexacta::GEM_FILE_DIR

Instance Method Summary collapse

Methods included from Hexacta

copy_all_files, copy_dir_structure, copy_file, gem_path, setup_dir

Instance Method Details

#enable_cross_originObject



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/sinatra/handlers/cross_origin.rb', line 6

def enable_cross_origin
  p "Enabling cross origin..."

  configure do
    enable :cross_origin
  end

  before do
    response.headers['Access-Control-Allow-Origin'] = '*'
  end

end