I have multiple dynamic directories that I want to prevent the user from accessing, but I'd like the server to load those files.
My structure is as follows but does grow dynamically so I can't statistically name the files:
- views/mods/headers/john/
- views/mods/headers/john/meta/screenshot.png
- views/mods/headers/john/index.html
- views/mods/headers/john/style.css
How do I provide access to the folder john
for the server and not a user trying to view it directly?, as well as screenshot.png, index.html and style.css
?
Fairly new to Node so I'm not that sure, but in .htaccess it would be something like this: (htaccess) How to prevent a file from DIRECT URL ACCESS?
Thanks.