restify/node-restify

NotAuthorized when serving static files.

Open

#549 aberto em 5 de mar. de 2014

Ver no GitHub
 (14 comments) (0 reactions) (0 assignees)JavaScript (983 forks)batch import
BugHelp WantedServe

Métricas do repositório

Stars
 (10.695 stars)
Métricas de merge de PR
 (Mesclagem média 3h 56m) (2 fundiu PRs em 30d)

Description

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

Guia do colaborador