Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions lib/capability-discovery.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ const serviceConfigDefaults = {
}
}

const appUrlDefaults = {
'signin': '/signin/',
'signup': '/signup/'
}

module.exports = capabilityDiscovery

/**
Expand Down Expand Up @@ -70,7 +65,7 @@ function serviceCapabilityDocument (serviceConfig) {
// Add the server root url
serviceConfig.root = util.uriBase(req) // TODO make sure we align with the rest
// Add the 'apps' urls section
serviceConfig.apps = req.app.locals.appUrls || appUrlDefaults
serviceConfig.apps = req.app.locals.appUrls
res.json(serviceConfig)
}
}
10 changes: 9 additions & 1 deletion test/capability-discovery.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@ describe('Capability Discovery', function () {
return done(err)
})
})
it('includes an app urls section', function (done) {
it('includes an apps config section', function (done) {
const config = {
apps: {
'signin': '/signin/',
'signup': '/signup/'
}
}
const solid = ldnode(config)
let server = supertest(solid)
server.get('/.well-known/solid')
.end(function (err, req) {
expect(req.body.apps).to.exist
Expand Down