proxy2 does auth inline
This commit is contained in:
@@ -4,13 +4,14 @@ import (
|
||||
"bytes"
|
||||
"crypto/tls"
|
||||
"io"
|
||||
"gitea.inhome.blapointe.com/local/rproxy3/config"
|
||||
"gitea.inhome.blapointe.com/local/rproxy3/storage/packable"
|
||||
"log"
|
||||
"net/http"
|
||||
"net/http/httputil"
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"gitea.inhome.blapointe.com/local/rproxy3/config"
|
||||
"gitea.inhome.blapointe.com/local/rproxy3/storage/packable"
|
||||
)
|
||||
|
||||
type redirPurge struct {
|
||||
@@ -51,10 +52,10 @@ func (s *Server) lookup(host string) (*url.URL, error) {
|
||||
return v.URL(), err
|
||||
}
|
||||
|
||||
func (s *Server) lookupAuth(host string) (bool, error) {
|
||||
func (s *Server) lookupAuth(host string) (string, error) {
|
||||
v := packable.NewString()
|
||||
err := s.db.Get(nsBOAuthZ, host, v)
|
||||
return v.String() == "true", err
|
||||
err := s.db.Get(nsRouting, host+"//auth", v)
|
||||
return v.String(), err
|
||||
}
|
||||
|
||||
func mapKey(host string) string {
|
||||
|
||||
Reference in New Issue
Block a user