mirror of
https://github.com/TecharoHQ/anubis.git
synced 2025-08-03 09:48:08 -04:00
chore: fixes found in review
Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
parent
41993466a1
commit
364622d890
@ -435,6 +435,7 @@ func (s *Server) PassChallenge(w http.ResponseWriter, r *http.Request) {
|
||||
if err != nil {
|
||||
lg.Error("check failed", "err", err)
|
||||
s.respondWithError(w, r, fmt.Sprintf("%s: %s", localizer.T("internal_server_error"), rule.Challenge.Algorithm))
|
||||
return
|
||||
}
|
||||
|
||||
in := &challenge.ValidateInput{
|
||||
|
@ -188,9 +188,9 @@ func ParseConfig(ctx context.Context, fin io.Reader, fname string, defaultDiffic
|
||||
store, err := stFac.Build(ctx, c.Store.Parameters)
|
||||
if err != nil {
|
||||
validationErrs = append(validationErrs, err)
|
||||
} else {
|
||||
result.Store = store
|
||||
}
|
||||
|
||||
result.Store = store
|
||||
case false:
|
||||
validationErrs = append(validationErrs, config.ErrUnknownStoreBackend)
|
||||
}
|
||||
|
@ -62,8 +62,7 @@ func (i *impl) cleanupThread(ctx context.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
// NewDecayMapStore creates a simple in-memory store. This will not scale
|
||||
// to multiple Anubis instances.
|
||||
// New creates a simple in-memory store. This will not scale to multiple Anubis instances.
|
||||
func New(ctx context.Context) store.Interface {
|
||||
result := &impl{
|
||||
store: decaymap.New[string, []byte](),
|
||||
|
Loading…
x
Reference in New Issue
Block a user