From 77e50caaf2ef81cd91075cf836fed0e75718ffb4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 23:12:02 +0200 Subject: Adding debian version 1.8.3-2. Signed-off-by: Daniel Baumann --- debian/vendor-h2o/doc/configure/basic_auth.html | 101 ++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 debian/vendor-h2o/doc/configure/basic_auth.html (limited to 'debian/vendor-h2o/doc/configure/basic_auth.html') diff --git a/debian/vendor-h2o/doc/configure/basic_auth.html b/debian/vendor-h2o/doc/configure/basic_auth.html new file mode 100644 index 0000000..7c3825c --- /dev/null +++ b/debian/vendor-h2o/doc/configure/basic_auth.html @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + +Using Basic Authentication - Configure - H2O - the optimized HTTP/2 server + + +
+
+ +

+H2O +

+

the optimized HTTP/1.x, HTTP/2 server

+ + +
+ +
+ +
+
+
+Powered by Oktavia +
+
+ + +
+ + + + + + + + + + + + +
+ +

+Configure > +Using Basic Authentication +

+ + +

+Starting from version 1.7, H2O comes with a mruby script named htpasswd.rb that implements Basic Authentication. +The script provides a Rack handler that implements Basic Authentication using password files generated by the htpasswd command. +

+ +

+Below example uses the mruby script to restrict access to the path. +If authentication fails, the mruby handler returns a 401 Unauthorized response. +If authentication succeeds, the handler returns a 399 response, and the request is delegated internally to the next handler (i.e. file.dir). +

+ +
+
Example. Configuring HTTP authentication using htpasswd.rb
+
paths:
+  "/":
+    mruby.handler: |
+      require "htpasswd.rb"
+      Htpasswd.new("/path/to/.htpasswd", "realm-name")
+    file.dir: /path/to/doc_root
+
+
+ + +

+In H2O versions prior to 2.0, you should specify "#{$H2O_ROOT}/share/h2o/mruby/htpasswd.rb" as the argument to require, since the directory is not registered as part of $LOAD_PATH. +

+ +For convenience, the mruby script also forbids access to files or directories that start with .ht. + + + + +
+ + + -- cgit v1.2.3