Do basic auth in Caddy, but delegating user/pass auth to kemal
This commit is contained in:
@ -5,9 +5,12 @@ require "./terminal.cr"
|
||||
require "compress/gzip"
|
||||
require "crystar"
|
||||
require "docr"
|
||||
require "kemal-basic-auth"
|
||||
require "kemal"
|
||||
require "uuid"
|
||||
|
||||
basic_auth "admin", "admin"
|
||||
|
||||
macro version
|
||||
"{{ `grep version shard.yml | cut -d: -f2` }}".strip()
|
||||
end
|
||||
|
@ -30,24 +30,25 @@ module Proxy
|
||||
containers = docker_api.containers.list(all: true)
|
||||
config = <<-CONFIG
|
||||
{
|
||||
http_port 8888
|
||||
https_port 8887
|
||||
local_certs
|
||||
http_port 8888
|
||||
https_port 8887
|
||||
local_certs
|
||||
}
|
||||
|
||||
http://*:8888 {
|
||||
basicauth /admin/* {
|
||||
admin {$FAASO_PASSWORD}
|
||||
forward_auth /admin/* http://127.0.0.1:3000 {
|
||||
uri http://127.0.0.1:3000
|
||||
copy_headers {
|
||||
Authorization
|
||||
}
|
||||
}
|
||||
|
||||
handle_path /admin/terminal/* {
|
||||
reverse_proxy /* http://127.0.0.1:7681
|
||||
}
|
||||
handle_path /admin/* {
|
||||
reverse_proxy /* http://127.0.0.1:3000
|
||||
}
|
||||
|
||||
|
||||
handle_path /admin/terminal/* {
|
||||
reverse_proxy /* http://127.0.0.1:7681
|
||||
}
|
||||
handle_path /admin/* {
|
||||
reverse_proxy /* http://127.0.0.1:3000
|
||||
}
|
||||
CONFIG
|
||||
|
||||
funkos = Funko::Funko.from_docker
|
||||
|
Reference in New Issue
Block a user