basic-http-server icon indicating copy to clipboard operation
basic-http-server copied to clipboard

Multiple Improvements

Open richard-uk1 opened this issue 4 years ago • 3 comments

I've bundled up all my previous PRs into a single PR and added basic auth. I needed all this stuff for some use of my own, but hope that the work is useful to others. This PR includes

  • Protection against accessing files or folders outside of the root directory (and a switch to turn it off)
  • Turn a panic into an error when a socket is already in use.
  • URLs not found are redirected to root, unless they look like a file. The 'unless they look like a file' part I added because I found it confusing when I'd misspelled a file name and got the index.html rather than a not found.
  • A very liberal impl of basic http auth, which will accept empty usernames, passwords. This isn't designed to be secure: I intent to use it to keep a website embargoed, but I don't care if someone guesses the password: there isn't anything private on the website. It shouldn't be used for securing things properly.

Closes #23 Closes #22 Closes #19

richard-uk1 avatar Mar 05 '21 15:03 richard-uk1

Patiently awaiting these improvements 👍

anderejd avatar Mar 23 '21 10:03 anderejd

Pingy ping :slightly_smiling_face:

richard-uk1 avatar Jun 18 '21 12:06 richard-uk1

Hi @brson hope you don't mind another ping. I promise it's an easy to review PR. :)

richard-uk1 avatar Jul 05 '23 13:07 richard-uk1