Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dee04b6962 | ||
|
|
87d95b4eff | ||
|
|
669f3283f4 |
@@ -9,6 +9,9 @@ import (
|
||||
|
||||
"gitea.inhome.blapointe.com/local/args"
|
||||
"gitea.inhome.blapointe.com/local/logb"
|
||||
|
||||
"gitea.inhome.blapointe.com/local/args"
|
||||
"gitea.inhome.blapointe.com/local/logb"
|
||||
)
|
||||
|
||||
var conf *args.ArgSet
|
||||
|
||||
6
go.mod
6
go.mod
@@ -7,6 +7,12 @@ require (
|
||||
gitea.inhome.blapointe.com/local/logb v0.0.0-20231109150430-1221d87a6dbc
|
||||
gitea.inhome.blapointe.com/local/oauth2 v0.0.0-20240109220403-8897142866f1
|
||||
github.com/google/uuid v1.3.0
|
||||
<<<<<<< HEAD
|
||||
gitea.inhome.blapointe.com/local/args v0.0.0-20230410154220-44370f257b34
|
||||
gitea.inhome.blapointe.com/local/logb v0.0.0-20230410154319-880efa39d871
|
||||
gitea.inhome.blapointe.com/local/oauth2 v0.0.0-20230410162733-d39498ff8454
|
||||
=======
|
||||
>>>>>>> f083763f1d7e0fd450f167db58f091310c8b2ec2
|
||||
golang.org/x/time v0.1.0
|
||||
)
|
||||
|
||||
|
||||
@@ -12,6 +12,9 @@ import (
|
||||
|
||||
"gitea.inhome.blapointe.com/local/rproxy3/config"
|
||||
"gitea.inhome.blapointe.com/local/rproxy3/storage/packable"
|
||||
|
||||
"gitea.inhome.blapointe.com/local/rproxy3/config"
|
||||
"gitea.inhome.blapointe.com/local/rproxy3/storage/packable"
|
||||
)
|
||||
|
||||
type redirPurge struct {
|
||||
|
||||
@@ -20,6 +20,10 @@ import (
|
||||
"gitea.inhome.blapointe.com/local/rproxy3/storage"
|
||||
"gitea.inhome.blapointe.com/local/rproxy3/storage/packable"
|
||||
|
||||
"gitea.inhome.blapointe.com/local/rproxy3/config"
|
||||
"gitea.inhome.blapointe.com/local/rproxy3/storage"
|
||||
"gitea.inhome.blapointe.com/local/rproxy3/storage/packable"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"golang.org/x/time/rate"
|
||||
)
|
||||
@@ -154,7 +158,7 @@ func (s *Server) Pre(foo http.HandlerFunc) http.HandlerFunc {
|
||||
log.Printf("failed to lookup auth for %s (%s): %v", r.Host, mapKey(r.Host), err)
|
||||
w.Header().Set("WWW-Authenticate", "Basic")
|
||||
http.Error(w, err.Error(), http.StatusUnauthorized)
|
||||
} else if _, p, _ := r.BasicAuth(); auth != p {
|
||||
} else if _, p, _ := r.BasicAuth(); auth != "" && auth != p {
|
||||
log.Printf("failed to auth: expected %q but got %q", auth, p)
|
||||
w.Header().Set("WWW-Authenticate", "Basic")
|
||||
http.Error(w, "unexpected basic auth", http.StatusUnauthorized)
|
||||
|
||||
@@ -11,6 +11,9 @@ import (
|
||||
"gitea.inhome.blapointe.com/local/rproxy3/config"
|
||||
"gitea.inhome.blapointe.com/local/rproxy3/storage"
|
||||
|
||||
"gitea.inhome.blapointe.com/local/rproxy3/config"
|
||||
"gitea.inhome.blapointe.com/local/rproxy3/storage"
|
||||
|
||||
"golang.org/x/time/rate"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user