File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -727,7 +727,14 @@ func New(options *Options) *API {
727
727
r .Post ("/azure-instance-identity" , api .postWorkspaceAuthAzureInstanceIdentity )
728
728
r .Post ("/aws-instance-identity" , api .postWorkspaceAuthAWSInstanceIdentity )
729
729
r .Post ("/google-instance-identity" , api .postWorkspaceAuthGoogleInstanceIdentity )
730
- r .Get ("/connection" , api .workspaceAgentConnectionGeneric )
730
+ r .With (
731
+ apiKeyMiddlewareOptional ,
732
+ httpmw .ExtractWorkspaceProxy (httpmw.ExtractWorkspaceProxyConfig {
733
+ DB : options .Database ,
734
+ Optional : true ,
735
+ }),
736
+ httpmw .RequireAPIKeyOrWorkspaceProxyAuth (),
737
+ ).Get ("/connection" , api .workspaceAgentConnectionGeneric )
731
738
r .Route ("/me" , func (r chi.Router ) {
732
739
r .Use (httpmw .ExtractWorkspaceAgent (httpmw.ExtractWorkspaceAgentConfig {
733
740
DB : options .Database ,
You can’t perform that action at this time.
0 commit comments