зеркало из https://github.com/mozilla/gombot.git
enable unauthorized access to docs
This commit is contained in:
Родитель
fb90e739d1
Коммит
f1e710391d
3
bin/api
3
bin/api
|
@ -33,6 +33,9 @@ apiOptions.auth.getCredentialsFunc = credentialsFunc;
|
|||
var bindTo = config.process.api;
|
||||
var server = new Hapi.Server(bindTo.host, bindTo.port, apiOptions);
|
||||
|
||||
// don't require authorization for docs
|
||||
server._routes['get'][0].config.auth = config.hapi.docs.auth;
|
||||
|
||||
console.log("api starting up");
|
||||
|
||||
// now load up api handlers
|
||||
|
|
|
@ -21,7 +21,11 @@ var config = module.exports = {
|
|||
},
|
||||
hapi: {
|
||||
name: "Gombot API Server",
|
||||
docs: true,
|
||||
docs: {
|
||||
auth: {
|
||||
mode: 'none'
|
||||
}
|
||||
},
|
||||
auth: {
|
||||
scheme: 'hawk'
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче