Create option to read ini file without validating frontend files (#109990)

This commit is contained in:
Sarah Zinger
2025-08-22 18:28:40 +00:00
committed by GitHub
parent 021726dfe2
commit a38c113227
+6
View File
@@ -1087,6 +1087,12 @@ func NewCfgFromBytes(bytes []byte) (*Cfg, error) {
return NewCfgFromINIFile(parsedFile)
}
// prevents a log line from being printed when the static root path is not found, useful for apiservers that have no frontend
func NewCfgFromBytesWithoutJSValidation(bytes []byte) (*Cfg, error) {
skipStaticRootValidation = true
return NewCfgFromBytes(bytes)
}
// NewCfgFromINIFile specialized function to create a new Cfg from an ini.File.
func NewCfgFromINIFile(iniFile *ini.File) (*Cfg, error) {
cfg := NewCfg()