UNPKG

@nzz/q-server

Version:

__Q__ is a system that lets journalists create visual elements for stories. It is developed by [NZZ Storytelling](https://www.nzz.ch/storytelling) and used in the [NZZ](https://www.nzz.ch) newsroom.

15 lines (11 loc) 461 B
const server = require('../../server.js').getServer(); let dbUrl = server.settings.app.misc.get('/authStrategy/couchdb_cookie/db/host'); if (!dbUrl) { dbUrl = server.settings.app.misc.get('/authStrategy/couchdb_cookie/couchdbHost'); } if (!dbUrl.startsWith('http')) { dbUrl = `${server.settings.app.misc.get('/authStrategy/couchdb_cookie/db/protocol') || 'https'}://${dbUrl}`; } server.auth.strategy('q-auth', 'couchdb-cookie', { couchdbUrl: dbUrl });