.github
alerting
client
config
controller
badge.go
controller.go
controller_test.go
cors.go
favicon.go
gzip.go
spa.go
util.go
util_test.go
core
docs
examples
jsonpath
k8s
k8stest
metric
pattern
security
storage
util
vendor
watchdog
web
.dockerignore
.gitattributes
.gitignore
Dockerfile
LICENSE.md
Makefile
README.md
config.yaml
go.mod
go.sum
main.go
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)
|
|
})
|
|
}
|