Serving statics before everyauth fires

15 views
Skip to first unread message

Arne Claassen

unread,
Mar 12, 2012, 12:54:52 PM3/12/12
to everyauth
I had the same problem described in Issue:

https://github.com/bnoguchi/everyauth/issues/144

But I already have the static middleware before all other middleware
declarations, but still, every request does auth on each static file.
Here's how i create the server:

var app = express.createServer(
express.static(__dirname + '/../static'),
express.bodyParser(),
express.favicon(),
express.cookieParser(),
express.session({ secret:'.....', store:new
RiakStore({client:db})}),
everyauth.middleware()
);

I tried to move the middleware declaration into app.configure using
app.use, in case order made a difference there, but no difference.
What am I doing wrong, or how do i configure everyauth to only be
invoked for certain paths?

thanks,
arne
Reply all
Reply to author
Forward
0 new messages