Skip to content

Commit 9a72ddf

Browse files
authored
fix(enterprise/coderd): add missing fields to extract api key config (#8393)
1 parent 9f2a931 commit 9a72ddf

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

enterprise/coderd/coderd.go

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,18 @@ func New(ctx context.Context, options *Options) (_ *API, err error) {
8383
OIDC: options.OIDCConfig,
8484
}
8585
apiKeyMiddleware := httpmw.ExtractAPIKeyMW(httpmw.ExtractAPIKeyConfig{
86-
DB: options.Database,
87-
OAuth2Configs: oauthConfigs,
88-
RedirectToLogin: false,
86+
DB: options.Database,
87+
OAuth2Configs: oauthConfigs,
88+
RedirectToLogin: false,
89+
DisableSessionExpiryRefresh: options.DeploymentValues.DisableSessionExpiryRefresh.Value(),
90+
Optional: false,
8991
})
9092
apiKeyMiddlewareOptional := httpmw.ExtractAPIKeyMW(httpmw.ExtractAPIKeyConfig{
91-
DB: options.Database,
92-
OAuth2Configs: oauthConfigs,
93-
RedirectToLogin: false,
94-
Optional: true,
93+
DB: options.Database,
94+
OAuth2Configs: oauthConfigs,
95+
RedirectToLogin: false,
96+
DisableSessionExpiryRefresh: options.DeploymentValues.DisableSessionExpiryRefresh.Value(),
97+
Optional: true,
9598
})
9699

97100
deploymentID, err := options.Database.GetDeploymentID(ctx)

0 commit comments

Comments
 (0)