1 
                    
                    halczy      2018-09-11 17:17:59 +08:00 
                    
                    
                 | 
            
     2 
                    
                    jerry      2018-09-11 17:18:03 +08:00 via iPhone 
                    
                    
                 | 
            
     3 
                    
                    wildcat007   OP  | 
            
     4 
                    
                    momocraft      2018-09-11 17:28:26 +08:00 
                    
                    不如试一下 
                 | 
            
     5 
                    
                    wildcat007   OP OK 解决 使用 http.jwt 和 http.login 插件即可 
                @halczy @jerry @momocraft 配置如下 xxx.com { log /xx/xx/xx/xx.log tls [email protected] gzip timeouts none proxy / http://127.0.0.1:28080 { header_upstream Host {host} header_upstream X-Real-IP {remote} header_upstream X-Forwarded-For {remote} header_upstream X-Forwarded-Proto {scheme} } jwt { path / allow sub bob } login { simple name=password } }  | 
            
     6 
                    
                    DD0a48YwCzYUCQ8y      2024-05-22 17:10:17 +08:00 
                    
                    https://caddyserver.com/docs/caddyfile/directives/basicauth 
                最新已支持访问网站输入密码了 example.com { basicauth { # Username "Bob", password "hiccup" Bob $2a$14$Zkx19XLiW6VYouLHR5NmfOFU0z2GTNmpkT/5qqR7hx4IjWJPDhjvG } respond "Welcome, {http.auth.user.id}" 200 }  |