From 08783df3630ce20ab89ec6fdb778afde0d8a6a4f Mon Sep 17 00:00:00 2001 From: Adhityaa Date: Sun, 3 Jun 2018 20:47:31 +0530 Subject: [PATCH] config.go: Set CDN_PREFIX to ORIGIN if empty --- api/config.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/config.go b/api/config.go index 5d434d4..a4b0a04 100644 --- a/api/config.go +++ b/api/config.go @@ -36,5 +36,9 @@ func parseConfig() error { } } + if os.Getenv("CDN_PREFIX") == "" { + os.Setenv("CDN_PREFIX", os.Getenv("ORIGIN")) + } + return nil }