restify/node-restify

NotAuthorized when serving static files.

オープン

#549 opened on 2014/03/05

 (14 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (983 件のフォーク)batch import
BugHelp WantedServe

Repository metrics

Stars
 (10,695 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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"
}));

コントリビューターガイド