mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-24 03:59:49 +02:00
middleware: equalize lengths of input (#1934)
Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
parent
e56fb38cb5
commit
9c7958b66f
4 changed files with 75 additions and 24 deletions
|
@ -6,6 +6,7 @@ import (
|
|||
|
||||
"github.com/pomerium/pomerium/internal/httputil"
|
||||
"github.com/pomerium/pomerium/internal/log"
|
||||
"github.com/pomerium/pomerium/internal/middleware"
|
||||
"github.com/pomerium/pomerium/internal/telemetry"
|
||||
"github.com/pomerium/pomerium/internal/telemetry/metrics"
|
||||
)
|
||||
|
@ -89,7 +90,7 @@ func (mgr *MetricsManager) updateServer(cfg *Config) {
|
|||
}
|
||||
|
||||
if username, password, ok := cfg.Options.GetMetricsBasicAuth(); ok {
|
||||
handler = httputil.RequireBasicAuth(handler, username, password)
|
||||
handler = middleware.RequireBasicAuth(username, password)(handler)
|
||||
}
|
||||
|
||||
mgr.srv, err = httputil.NewServer(&httputil.ServerOptions{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue