diff --git a/lib/api/2011-02-01/configuration.js b/lib/api/2011-02-01/configuration.js index e79413f..fd637d0 100644 --- a/lib/api/2011-02-01/configuration.js +++ b/lib/api/2011-02-01/configuration.js @@ -84,14 +84,15 @@ handlers.CreateDomain = function(database, request, response) { }) .next(function(data) { var host = getBaseDomain(request.headers.host); + host = host ? '.' + host : '' ; response.contentType('application/xml'); response.send(createCreateDomainResponse({ domainName: domain.name, domainId: FAKE_DOMAIN_ID, searchEndpoint: 'http://search-' + domain.name + '-' + FAKE_DOMAIN_ID + - '/' + exports.version + '/search', + host + '/' + exports.version + '/search', documentsEndpoint: 'http://doc-' + domain.name + '-' + FAKE_DOMAIN_ID + - '/' + exports.version + '/documents', + host + '/' + exports.version + '/documents', created: true, searchableDocumentsCount: 0, searchInstanceCount: 0,