# README
XSS(Cross Site Scripting) Gin Middleware
It is a gin middleware that prevents XSS attacks based on bluemonday.
Usage
Start using it
Download and install it:
go get github.com/bettercode-oss/gin-middleware-xss
Import it in your code:
import "github.com/bettercode-oss/gin-middleware-xss"
Example
package main
import (
"github.com/gin-gonic/gin"
xss "github.com/bettercode-oss/gin-middleware-xss"
"net/http"
)
func main() {
r := gin.Default()
r..Use(xss.Sanitizer(xss.Config{
TargetHttpMethods: []string{http.MethodPost, http.MethodPut},
UrlsToExclude: []string{"/login"},
}))
r.Run()
}
# Functions
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author