here’s the stack:
Error: Forbidden
at SendStream.error (/Users/jlage/Development/web/server/bootstrap/node_modules/express/node_modules/send/lib/send.js:145:16)
at SendStream.pipe (/Users/jlage/Development/web/server/bootstrap/node_modules/express/node_modules/send/lib/send.js:307:39)
at ServerResponse.res.sendfile (/Users/jlage/Development/web/server/bootstrap/node_modules/express/lib/response.js:336:8)
at module.exports.load_funds_list (/Users/jlage/Development/web/amber/controllers/ref-data.js:23:12)
at Object.oncomplete (fs.js:297:15)
That error comes from the path containing
..
(up parent directory) and you didn’t supply theroot
option. Try using sendfile like so:The root option should be the directory you want to serve the files from. It is intended to prevent the path from containing things like
..
so a user may get the server to serve a file outside that directory.