Mount application on proper location

Uses mapping in config.ru to respect sub-uri settings in pod_uri.
This commit is contained in:
Alec Leamas 2011-01-09 23:29:52 +01:00
parent 685b809248
commit 18827b40d1
2 changed files with 14 additions and 2 deletions

View file

@ -7,5 +7,9 @@
require ::File.expand_path('../config/environment', __FILE__)
#use Rack::FiberPool
require ::File.expand_path('../lib/chrome_frame', __FILE__)
use Rack::ChromeFrame, :minimum => 8
run Diaspora::Application
map AppConfig[:pod_uri].path do
use Rack::ChromeFrame, :minimum => 8
use Rack::ShowExceptions
run Diaspora::Application
end

View file

@ -0,0 +1,8 @@
p = AppConfig[ :pod_uri].path
if p and not p.empty? and p != "/"
Rails.application.routes.default_url_options = { :script_name => p }
else
p = nil
end