From 3a5383589b7de961fdb341054285a989bfe12722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Tikvi=C4=87?= Date: Wed, 8 Feb 2017 09:37:52 +0100 Subject: [PATCH] Improved documentation. --- http_utility.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/http_utility.go b/http_utility.go index 9896b87..c187b47 100644 --- a/http_utility.go +++ b/http_utility.go @@ -54,7 +54,8 @@ func UnauthorizedResponse(w http.ResponseWriter, req *http.Request) { } // TODO: Check for content type -// Sets common headers, checks for token validity and performs access control. +// WrapHandler sets common headers, checks for token validity and performs access control. +// If authentication passes it calls the handlerFunc. func WrapHandler(handlerFunc http.HandlerFunc, auth bool) http.HandlerFunc { return func(w http.ResponseWriter, req *http.Request) { w.Header().Set("Access-Control-Allow-Origin", "*") -- 1.8.1.2