Permalink
Browse files

enable unauthorized access to docs

  • Loading branch information...
1 parent fb90e73 commit f1e710391df875b36cc29a446565095f348cee5d @zaach zaach committed Dec 7, 2012
Showing with 8 additions and 1 deletion.
  1. +3 −0 bin/api
  2. +5 −1 etc/config.js
View
@@ -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
View
@@ -21,7 +21,11 @@ var config = module.exports = {
},
hapi: {
name: "Gombot API Server",
- docs: true,
+ docs: {
+ auth: {
+ mode: 'none'
+ }
+ },
auth: {
scheme: 'hawk'
}

0 comments on commit f1e7103

Please sign in to comment.