Blame view

config.ru 506 Bytes
d4e63efe   Antonio Terceiro   Migration to Rail...
1
2
3
# This file is used by Rack-based servers to start the application.

require ::File.expand_path('../config/environment',  __FILE__)
339fa730   Leandro Santos   adding initial in...
4

30352374   Rodrigo Souto   api: (finally) fi...
5
6
7
8
9
10
11
use Rack::Cors do
  allow do
    origins '*'
    resource '/api/*', :headers => :any, :methods => [:get, :post]
  end
end

339fa730   Leandro Santos   adding initial in...
12
rails_app = Rack::Builder.new do
b71625c8   Rodrigo Souto   Merge branch 'mas...
13
14
15
16
17
  if ENV['RAILS_RELATIVE_URL_ROOT']
    map ENV['RAILS_RELATIVE_URL_ROOT'] do
      run Noosfero::Application
    end
  else
eb3d2e2c   Antonio Terceiro   core: switch to u...
18
19
    run Noosfero::Application
  end
339fa730   Leandro Santos   adding initial in...
20
end
3ddab2ed   Victor Costa   rails3: fix grape...
21

339fa730   Leandro Santos   adding initial in...
22
run Rack::Cascade.new([
d71ef742   Braulio Bhavamitra   api: move to app/api
23
  Api::App,
339fa730   Leandro Santos   adding initial in...
24
25
  rails_app
])