Permalink
Browse files

fix Router#getTargetURL (and thus Controller#linkTo), absolute URLs

  • Loading branch information...
1 parent 3b8f0ce commit edb90abe13385d4155394de8a4229b6e64d6a5ec @jankuca committed Jun 15, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Router.js
View
@@ -50,7 +50,7 @@ Router.prototype.getTargetURL = function (target, params, request) {
if (current_host === route.host) {
return pathname_and_search;
} else {
- host_levels[0] = route.host;
+ host_levels[0] = (route.host === '*') ? current_host : route.host;
// We need to keep the eventual :port part of the host.
var port = request.getPort();
port = port === 80 ? '' : ':' + port;

0 comments on commit edb90ab

Please sign in to comment.