1

How do I password protect a subdirectory in a Harp site (running under Node)?

I want something like basic auth but for a single folder, not the whole site.

KemanoThief
  • 587
  • 7
  • 23

1 Answers1

1

If you're using Harp through command line, by running harp server then you can't because then it's just a static file server and you can't do any server-side coding.

You'll have to switch to Express (here's how to use BasicAuth with it). You can still use Harp (as a static server, like you were using it before) from within Express (as a middleware). Or you can just use Express static

Community
  • 1
  • 1
laggingreflex
  • 29,919
  • 31
  • 129
  • 183