aboutsummaryrefslogtreecommitdiffstats
path: root/actionwebservice/lib
diff options
context:
space:
mode:
Diffstat (limited to 'actionwebservice/lib')
-rw-r--r--actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb b/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb
index a959150f9d..2c7d5a0948 100644
--- a/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb
+++ b/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb
@@ -167,7 +167,7 @@ module ActionWebService # :nodoc:
private
def base_uri
- host = request.env['HTTP_HOST'] || request.env['SERVER_NAME'] || 'localhost'
+ host = request.host_with_port
relative_url_root = request.relative_url_root
scheme = request.ssl? ? 'https' : 'http'
'%s://%s%s/%s/' % [scheme, host, relative_url_root, self.class.controller_path]