diff options
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/xedn/fly.toml | 5 | ||||
| -rw-r--r-- | cmd/xedn/main.go | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/cmd/xedn/fly.toml b/cmd/xedn/fly.toml index c96fd08..e6cceda 100644 --- a/cmd/xedn/fly.toml +++ b/cmd/xedn/fly.toml @@ -23,6 +23,11 @@ auto_extend_size_threshold = 80 auto_extend_size_increment = "1GB" auto_extend_size_limit = "100GB" +#[[statics]] +#url_prefix = "/file/christine-static" +#guest_path = "/unused" +#tigris_bucket = "xedn" +# [[services]] protocol = "tcp" internal_port = 8080 diff --git a/cmd/xedn/main.go b/cmd/xedn/main.go index ffdcd02..5ede100 100644 --- a/cmd/xedn/main.go +++ b/cmd/xedn/main.go @@ -260,11 +260,19 @@ func main() { h = xffMW.Handler(h) h = cors.Default().Handler(h) h = FlyRegionAnnotation(h) + h = XeDNAnnotation(h) slog.Info("starting up", "addr", *addr) http.ListenAndServe(*addr, h) } +func XeDNAnnotation(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("XeDN", "true") + next.ServeHTTP(w, r) + }) +} + func FlyRegionAnnotation(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Fly-Region", os.Getenv("FLY_REGION")) |
