mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-25 17:33:19 +01:00
11 lines
265 B
Go
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)
|
|
})
|
|
}
|