copy disable_replication_status_endpoints context value from request context to active context (#23650)

This commit is contained in:
Marc Boudreau 2023-10-13 16:02:19 -04:00 committed by GitHub
parent 4e22153987
commit 9a6294fbdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -571,6 +571,10 @@ func (c *Core) switchedLockHandleRequest(httpCtx context.Context, req *logical.R
if ok {
ctx = context.WithValue(ctx, logical.CtxKeyRequestRole{}, requestRole)
}
disable_repl_status, ok := httpCtx.Value(logical.CtxKeyDisableReplicationStatusEndpoints{}).(string)
if ok {
ctx = context.WithValue(ctx, logical.CtxKeyDisableReplicationStatusEndpoints{}, disable_repl_status)
}
resp, err = c.handleCancelableRequest(ctx, req)
req.SetTokenEntry(nil)
cancel()