forked from gatolteam/gatol
-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.ru
26 lines (21 loc) · 773 Bytes
/
config.ru
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__)
run Rails.application
use Rack::Cors do
allow do
origins 'localhost:3000', '127.0.0.1:3000', 'https://calm-garden-9078.herokuapp.com'
/^http:\/\/192\.168\.0\.\d{1,3}(:\d+)?$/
# regular expressions can be used here
resource '/file/list_all/', :headers => 'x-domain-token'
resource '/file/at/*',
:methods => [:get, :post, :put, :delete, :options],
:headers => 'x-domain-token',
:expose => ['Some-Custom-Response-Header'],
:max_age => 600
# headers to expose
end
allow do
origins '*'
resource '/public/*', :headers => :any, :methods => :get
end
end