From 7df14e9c08502fe2ad6334cfa32b40e029b89812 Mon Sep 17 00:00:00 2001 From: Derek Horton Date: Fri, 15 Dec 2023 08:30:14 -0600 Subject: [PATCH] Try to require the identity header and store it in the request context --- internal/api/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/main.go b/internal/api/main.go index 3785e7ce..4e04ad3f 100644 --- a/internal/api/main.go +++ b/internal/api/main.go @@ -127,7 +127,7 @@ func Start( internal.Use(oapiMiddleware.OapiRequestValidator(privateSpec)) // Authorization header not required for GET /internal/version internal.GET("/version", privateController.ApiInternalVersion) - internal.POST("/v2/connection_status", privateController.ApiInternalHighlevelConnectionStatus) + internal.POST("/v2/connection_status", privateController.ApiInternalHighlevelConnectionStatus, echo.WrapMiddleware(identity.EnforceIdentity), middleware.ExtractHeaders(constants.HeaderIdentity)) internal.Use(middleware.CheckPskAuth(authConfig)) internal.Use(echo.WrapMiddleware(middleware.StoreAPIVersion)) internal.POST("/dispatch", privateController.ApiInternalRunsCreate)