restify/node-restify

NotAuthorized when serving static files.

开放

#549 创建于 2014年3月5日

 (14 条评论) (0 个反应) (0 位负责人)JavaScript (983 个派生)batch import
BugHelp WantedServe

仓库指标

星标
 (10,695 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

I'm trying to serve a static index.html file and I think my code is correct but when I go to http://localhost/static I get:

{
  code: "NotAuthorized",
  message: "/static"
}

Is it an issue with the current changes that have been made to the static file serving JS or is it an issue with my code?

Route:

app.get(/\/static\/?.*/, restify.serveStatic({ 
    directory: "./",
    default: "index.html"
}));

贡献者指南