✨ updated
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
package middleware
|
||||
|
||||
import "net/http"
|
||||
|
||||
func CORSMiddleware() func(http.Header) {
|
||||
return func(header http.Header) {
|
||||
header.Set("Access-Control-Allow-Origin", "*")
|
||||
header.Add("Access-Control-Allow-Headers", "UserHeader1, UserHeader2")
|
||||
header.Set("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS, PATCH")
|
||||
header.Set("Access-Control-Expose-Headers", "Content-Length, Content-Type")
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user