Aditya Siregar 9e95e8ee5e Init Eslogad
2025-08-09 15:09:43 +07:00

18 lines
287 B
Go

package middleware
import (
"github.com/gin-gonic/gin"
)
const (
contentTypeHeader = "Content-Type"
jsonContentType = "application/json"
)
func JsonAPI() gin.HandlerFunc {
return func(c *gin.Context) {
c.Writer.Header().Set(contentTypeHeader, jsonContentType)
c.Next()
}
}