mirror of
https://tangled.org/evan.jarrett.net/at-container-registry
synced 2026-09-22 02:04:16 +00:00
cleanup more auth
This commit is contained in:
@@ -4,21 +4,21 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"atcr.io/pkg/atproto"
|
||||
"github.com/bluesky-social/indigo/atproto/identity"
|
||||
)
|
||||
|
||||
// ATProtoHandler wraps an HTTP handler to provide name resolution
|
||||
// This is an optional layer if middleware doesn't provide enough control
|
||||
type ATProtoHandler struct {
|
||||
handler http.Handler
|
||||
resolver *atproto.Resolver
|
||||
handler http.Handler
|
||||
directory identity.Directory
|
||||
}
|
||||
|
||||
// NewATProtoHandler creates a new HTTP handler wrapper
|
||||
func NewATProtoHandler(handler http.Handler) *ATProtoHandler {
|
||||
return &ATProtoHandler{
|
||||
handler: handler,
|
||||
resolver: atproto.NewResolver(),
|
||||
handler: handler,
|
||||
directory: identity.DefaultDirectory(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user