From e1c5c7c74bc3d78424aa6318ab9aea3afbe89e84 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Mon, 10 Jul 2023 13:38:00 +0000 Subject: [PATCH] fix(enterprise/coderd): add missing fields to extract api key config --- enterprise/coderd/coderd.go | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/enterprise/coderd/coderd.go b/enterprise/coderd/coderd.go index cdeedfcf9e21d..75476b508eaad 100644 --- a/enterprise/coderd/coderd.go +++ b/enterprise/coderd/coderd.go @@ -83,15 +83,18 @@ func New(ctx context.Context, options *Options) (_ *API, err error) { OIDC: options.OIDCConfig, } apiKeyMiddleware := httpmw.ExtractAPIKeyMW(httpmw.ExtractAPIKeyConfig{ - DB: options.Database, - OAuth2Configs: oauthConfigs, - RedirectToLogin: false, + DB: options.Database, + OAuth2Configs: oauthConfigs, + RedirectToLogin: false, + DisableSessionExpiryRefresh: options.DeploymentValues.DisableSessionExpiryRefresh.Value(), + Optional: false, }) apiKeyMiddlewareOptional := httpmw.ExtractAPIKeyMW(httpmw.ExtractAPIKeyConfig{ - DB: options.Database, - OAuth2Configs: oauthConfigs, - RedirectToLogin: false, - Optional: true, + DB: options.Database, + OAuth2Configs: oauthConfigs, + RedirectToLogin: false, + DisableSessionExpiryRefresh: options.DeploymentValues.DisableSessionExpiryRefresh.Value(), + Optional: true, }) deploymentID, err := options.Database.GetDeploymentID(ctx)