allow full config

This commit is contained in:
Hiddify
2024-04-08 09:52:31 +02:00
parent b265886306
commit dd0c3614c9
6 changed files with 27 additions and 15 deletions

View File

@@ -173,7 +173,7 @@ func Parse(in *pb.ParseRequest) (*pb.ParseResponse, error) {
}
config, err := config.ParseConfigContent(content, true)
config, err := config.ParseConfigContent(content, true, false)
if err != nil {
return &pb.ParseResponse{
ResponseCode: pb.ResponseCode_FAILED,

View File

@@ -143,7 +143,7 @@ func extractRefreshInterval(header http.Header, bodyStr string) (int, error) {
return 0, nil
}
func buildConfig(configContent string, options config.ConfigOptions) (string, error) {
parsedContent, err := config.ParseConfigContent(configContent, true)
parsedContent, err := config.ParseConfigContent(configContent, true, options.EnableFullConfig)
if err != nil {
return "", fmt.Errorf("failed to parse config content: %w", err)
}