Add some foolproofery

This commit is contained in:
Svilen Markov 2024-08-05 14:11:19 +01:00
parent e1161b9227
commit 4de465e544

View File

@ -133,6 +133,8 @@ func NewApplication(config *Config) (*Application, error) {
config = &app.Config config = &app.Config
config.Server.BaseURL = strings.TrimRight(config.Server.BaseURL, "/")
if config.Server.BaseURL != "" && if config.Server.BaseURL != "" &&
config.Theme.CustomCSSFile != "" && config.Theme.CustomCSSFile != "" &&
strings.HasPrefix(config.Theme.CustomCSSFile, "/assets/") { strings.HasPrefix(config.Theme.CustomCSSFile, "/assets/") {