diff --git a/src/pages.go b/src/pages.go index e722be5..db3fea0 100644 --- a/src/pages.go +++ b/src/pages.go @@ -27,6 +27,15 @@ func getPage(w http.ResponseWriter, r *http.Request) error { host := GetHost(r) + if _, onBunnyNet := os.LookupEnv("BUNNYNET_MC_APPID"); onBunnyNet { + w.Header().Set("X-Bunnynet-MC", fmt.Sprintf( + "%s, %s, %s", + os.Getenv("BUNNYNET_MC_REGION"), + os.Getenv("BUNNYNET_MC_ZONE"), + os.Getenv("BUNNYNET_MC_PODID"), + )) + } + // allow JavaScript code to access responses (including errors) even across origins w.Header().Set("Access-Control-Allow-Origin", "*") w.Header().Set("Access-Control-Max-Age", "86400")