gatus/controller/handler/cors.go
2021-09-12 18:39:09 -04:00

11 lines
265 B
Go

package handler
import "net/http"
func DevelopmentCORS(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Access-Control-Allow-Origin", "http://localhost:8081")
next.ServeHTTP(w, r)
})
}