Skip to content

Commit

Permalink
gofmt and add comment to exported function
Browse files Browse the repository at this point in the history
  • Loading branch information
nullun committed Jul 31, 2024
1 parent d26fc33 commit 609290a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions daemon/algod/api/server/lib/middlewares/cors.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func MakeCORS(tokenHeader string) echo.MiddlewareFunc {
})
}

// MakePNA constructs the Private Network Access middleware function
func MakePNA() echo.MiddlewareFunc {
return func(next echo.HandlerFunc) echo.HandlerFunc {
return func(ctx echo.Context) error {
Expand Down
5 changes: 3 additions & 2 deletions daemon/kmd/api/cors.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func corsMiddleware(allowedOrigins []string) func(http.Handler) http.Handler {
}
}

// AllowPNA constructs the Private Network Access middleware function
func AllowPNA() func(http.Handler) http.Handler {
return func(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Expand All @@ -65,6 +66,6 @@ func AllowPNA() func(http.Handler) http.Handler {
}

next.ServeHTTP(w, r)
})
}
})
}
}

0 comments on commit 609290a

Please sign in to comment.