Permalink
Browse files

fix config for docs

  • Loading branch information...
zaach committed Jan 23, 2013
1 parent bb3744c commit 58958d4ccdff8c225ce0a594ad3ab61dfc7717c5
Showing with 2 additions and 2 deletions.
  1. +1 −1 bin/api
  2. +1 −1 bin/router
View
@@ -55,7 +55,7 @@ var bindTo = config.process.api;
var server = new Hapi.Server(bindTo.host, bindTo.port, options);
if (config.hapi.docs) {
- server.addRoute({ method: 'GET', path: '/docs', handler: { docs: true }, auth: { mode: 'none' } });
+ server.addRoute({ method: 'GET', path: '/api/docs', handler: { docs: true }, config: { auth: { mode: 'none' } } });
}
View
@@ -35,7 +35,7 @@ app.use(function(req, res, next) {
// redirect requests to the api processes
app.use(function(req, res, next) {
if (/^\/api/.test(req.url)) {
- forward(api_url + (req.url === '/api/docs' ? '/docs' : req.url),
+ forward(api_url + req.url,
req, res,
function(err) {
if (err) {

0 comments on commit 58958d4

Please sign in to comment.