Skip to content

Commit 4106e2a

Browse files
authored
fix(static): correct CDN fetch condition for index.html (#814)
1 parent c2271df commit 4106e2a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/static/static.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ func replaceStrings(content string, replacements map[string]string) string {
4444
func initIndex() {
4545
utils.Log.Debug("Initializing index.html...")
4646
siteConfig := getSiteConfig()
47-
if conf.Conf.DistDir != "" || (conf.Conf.Cdn != "" && (conf.WebVersion == "" || conf.WebVersion == "beta" || conf.WebVersion == "dev")) {
47+
// dist_dir is empty and cdn is not empty add web_version is empty or beta or dev
48+
if conf.Conf.DistDir == "" && conf.Conf.Cdn != "" && (conf.WebVersion == "" || conf.WebVersion == "beta" || conf.WebVersion == "dev") {
4849
utils.Log.Infof("Fetching index.html from CDN: %s/index.html...", conf.Conf.Cdn)
4950
resp, err := base.RestyClient.R().
5051
SetHeader("Accept", "text/html").

0 commit comments

Comments
 (0)