Skip to content

Commit 04e32bc

Browse files
committed
workspaceagents: fetch request ctx after httpmw.WorkspaceAgent sets authz subject
1 parent ab9c049 commit 04e32bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

coderd/workspaceagents.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ func (api *API) workspaceAgentMetadata(rw http.ResponseWriter, r *http.Request)
166166
// @Router /workspaceagents/me/version [post]
167167
// @x-apidocgen {"skip": true}
168168
func (api *API) postWorkspaceAgentVersion(rw http.ResponseWriter, r *http.Request) {
169-
ctx := r.Context()
170169
workspaceAgent := httpmw.WorkspaceAgent(r)
170+
ctx := r.Context()
171171
apiAgent, err := convertWorkspaceAgent(api.DERPMap, *api.TailnetCoordinator.Load(), workspaceAgent, nil, api.AgentInactiveDisconnectTimeout, api.DeploymentConfig.AgentFallbackTroubleshootingURL.Value)
172172
if err != nil {
173173
httpapi.Write(ctx, rw, http.StatusInternalServerError, codersdk.Response{

0 commit comments

Comments
 (0)