func Debug(req *http.Request) error {
	dumped, err := httputil.DumpRequestOut(req, true)
	if err != nil {
		return err
	}
	log.Printf("[DebugHTTPHeader] headers:\n%s\n", dumped)
	return nil
}
Debug debugs http request headers
package httpheader
import (
	"log"
	"net/http"
	"net/http/httputil"
	"github.com/gin-gonic/gin"
)
func SetResponseHeader(ctx *gin.Context) {
	ctx.Writer.Header().Set("X-Content-Type-Options", "nosniff")
	ctx.Writer.Header().Set("X-XSS-Protection", "1, mode=block")
	ctx.Writer.Header().Set("X-Frame-Options", "deny")
	ctx.Writer.Header().Set("Content-Security-Policy", "default-src 'none'")
}
func SetHTTPHeaders(req *http.Request, headers []map[string]string) {
	for _, header := range headers {
		for k, v := range header {
			req.Header.Set(k, v)
		}
	}
}