mirror of
https://github.com/TwiN/gatus.git
synced 2024-12-23 15:18:55 +01:00
11 lines
275 B
Go
11 lines
275 B
Go
|
package controller
|
||
|
|
||
|
import "net/http"
|
||
|
|
||
|
func developmentCorsHandler(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)
|
||
|
})
|
||
|
}
|