Basic Auth

Protects a route by using an authorization header

This is not necessarily a very safe method as anyone can try to brute force the username and password.

By enabling this, routes can only be accessed if the user (downstream) provides the user & password combination through the Authorization header.

In many cases, your browser will prompt for this information.

Options

Plugin options are always passed via the config key.

Name
Description

user

username for the basic authentication

pass

password for the basic authentication

Usage

proksi.hcl
lets_encrypt {
  enabled = true
  email = "test@email.com"
}

routes = [
 {
   host = "mywebsite.com"
   upstreams = [{ ip = "localhost", port = 3000 }]
   
   plugins = [{
     name = "basic_auth"
     config = {
       user = "91hdjashd1y2u"
       pass = "$17238a81hhasbzh1230%"
     }
   }]
 }

]

Last updated