Mount application on proper location
Uses mapping in config.ru to respect sub-uri settings in pod_uri.
This commit is contained in:
parent
685b809248
commit
18827b40d1
2 changed files with 14 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
8
config/initializers/sub_uri.rb
Normal file
8
config/initializers/sub_uri.rb
Normal 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
|
||||
|
||||
Loading…
Reference in a new issue