From 9a72ddf7d4ab1cd33d2831b0d6b126b1ee343793 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Mon, 10 Jul 2023 16:51:50 +0300 Subject: [PATCH] fix(enterprise/coderd): add missing fields to extract api key config (#8393) --- 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 cdeedfcf9e..75476b508e 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)