-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hidden files/folders #211
Labels
Comments
Let's say "sometimes" you don't want to serve something. require('http').createServer(function (request, response) {
request.addListener('end', function () {
// Serve files! ... or not?
if(request.url.includes('mom')) {
nodeStatic.serveFile('/nothing-about-mom.html', 404, {}, request, response);
}
nodeStatic.serve(request, response);
}).resume();
}).listen(8080); |
Yes, sure, thanks--I should have mentioned though that I was hoping for a CLI option... |
@brettz9 at least I don't see anything here https://github.com/cloudhead/node-static/blob/master/bin/cli.js |
This would be particularly helpful for an easy means to set up production static servers on the root of one's repository without fear of exposing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there any means, whether through a generic filter by file name, or by config specifically targeting hidden files/folders, that one may prevent/enable hidden files from being served? Thanks!
The text was updated successfully, but these errors were encountered: