mirror of
https://github.com/coder/coder.git
synced 2025-07-06 15:41:45 +00:00
fix: ensure agent token is from latest build in middleware (#12443)
This commit is contained in:
@ -336,7 +336,7 @@ func New(ctx context.Context, options *Options) (_ *API, err error) {
|
||||
r.Group(func(r chi.Router) {
|
||||
r.Use(
|
||||
apiKeyMiddlewareOptional,
|
||||
httpmw.ExtractWorkspaceAgent(httpmw.ExtractWorkspaceAgentConfig{
|
||||
httpmw.ExtractWorkspaceAgentAndLatestBuild(httpmw.ExtractWorkspaceAgentAndLatestBuildConfig{
|
||||
DB: options.Database,
|
||||
Optional: true,
|
||||
}),
|
||||
|
Reference in New Issue
Block a user