fixed code documentation

This commit is contained in:
Fran Jurmanović
2021-08-29 10:51:29 +02:00
parent 0682252859
commit f441f46494
35 changed files with 674 additions and 70 deletions

View File

@@ -2,9 +2,13 @@ package middleware
import "github.com/gin-gonic/gin"
// CORS Middleware.
//
// Add needed headers to make cors functioning.
/*
CORSMiddleware
Add needed headers to make cors functioning.
Args:
*gin.Context: Gin Application Context.
*/
func CORSMiddleware() gin.HandlerFunc {
return func(c *gin.Context) {
c.Writer.Header().Set("Access-Control-Allow-Origin", "*")