kachayev / nasus

Zero-configuration command-line async HTTP files server in Clojure. Like Python's SimpleHTTPServer but scalable.
MIT License
166 stars 9 forks source link

add glob support for excluding files and dirs #17

Closed Solaxun closed 5 years ago

Solaxun commented 5 years ago

This addresses issue #8

I added glob support to exclude files/paths for any glob passed to the CLI, which seemed easier than trying to limit it to a subset as mentioned in the issue. If limiting, I wasn't sure if I should try to somehow restrict globs by checking first, or just use regex, etc. This seemed the path of least resistance and also has the nice by-product of being more flexible anyways.

I wasn't sure if you wanted to 404 or 403 for restricted dirs, I put 404 for now.

kachayev commented 5 years ago

@Solaxun Thanks!