fix: add support for url-encoded vector-sink config values
We additionally force-replace \u0026 with an ampersand to ensure we properly support & in config values (such as for URIs).
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package logs
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
@@ -217,6 +218,8 @@ func writeVectorConfig() error {
|
||||
return err
|
||||
}
|
||||
|
||||
b = bytes.Replace(b, []byte("\\u0026"), []byte("&"), -1)
|
||||
|
||||
vectorConfig := filepath.Join(common.MustGetEnv("DOKKU_LIB_ROOT"), "data", "logs", "vector.json")
|
||||
if err := common.WriteSliceToFile(vectorConfig, []string{string(b)}); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user