restify/node-restify

NotAuthorized when serving static files.

Open

#549 aperta il 5 mar 2014

Vedi su GitHub
 (14 commenti) (0 reazioni) (0 assegnatari)JavaScript (983 fork)batch import
BugHelp WantedServe

Metriche repository

Star
 (10.695 star)
Metriche merge PR
 (Merge medio 3h 56m) (2 PR mergiate in 30 g)

Descrizione

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

Guida contributor