Skip to content

Commit

Permalink
Generate endpoints as subdomains of the given domain
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Jun 21, 2012
1 parent be894f7 commit 4dd2570
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/api/2011-02-01/configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4dd2570

Please sign in to comment.