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
2 weeks ago
assets Initial Commit 2 weeks ago
proxy Initial Commit 2 weeks ago
.gitignore Initial Commit 2 weeks ago
.goreleaser.yml Initial Commit 2 weeks ago
Dockerfile Initial Commit 2 weeks ago
LICENSE Initial commit 2 weeks ago
README.md Initial Commit 2 weeks ago
authn.yaml Initial Commit 2 weeks ago
go.mod Initial Commit 2 weeks ago
go.sum Initial Commit 2 weeks ago
main.go Initial Commit 2 weeks 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"
}