You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
James Mills 3cc59fb21c
Initial Commit
4 months ago
assets Initial Commit 4 months ago
proxy Initial Commit 4 months ago
.gitignore Initial Commit 4 months ago
.goreleaser.yml Initial Commit 4 months ago
Dockerfile Initial Commit 4 months ago
LICENSE Initial commit 4 months ago
README.md Initial Commit 4 months ago
authn.yaml Initial Commit 4 months ago
go.mod Initial Commit 4 months ago
go.sum Initial Commit 4 months ago
main.go Initial Commit 4 months ago

README.md

Basic Auth Reverse Proxy

This project offers a way to securize your backends with a basic golang reverse proxy with basic auth configuration.

Logo

TLDR;

Expose your services with basic authentication.

$ wget -O basic-auth-reverse-proxy.tar.gz -q https://github.com/angelbarrera92/basic-auth-reverse-proxy/releases/download/v0.1.2/basic-auth-reverse-proxy_0.1.2_linux_amd64.tar.gz
$ tar -zxvf basic-auth-reverse-proxy.tar.gz
README.md
basic-auth-reverse-proxy
$ cat >> authn.yaml <<EOL
users:
  - username: Angel
    password: Barrera
EOL
$ ./basic-auth-reverse-proxy serve

Then a local server is started. Try to access it:

$ curl http://localhost:11811/get
Unauthorised
$ curl http://Angel:Barrera@localhost:11811/get
{
  "args": {},
  "headers": {
    "Accept": "*/*",
    "Accept-Encoding": "gzip",
    "Authorization": "Basic QW5nZWw6QmFycmVyYQ==",
    "Host": "httpbin.org",
    "User-Agent": "curl/7.58.0",
    "X-Forwarded-Host": "localhost:11811"
  },
  "origin": "127.0.0.1, 80.25.227.133, 127.0.0.1",
  "url": "https://localhost:11811/get"
}