فهرست منبع

Merge branch 'v3.0.x'

Torkel Ödegaard 9 سال پیش
والد
کامیت
8ab324988c
2فایلهای تغییر یافته به همراه7 افزوده شده و 1 حذف شده
  1. 4 0
      pkg/middleware/util.go
  2. 3 1
      public/app/plugins/datasource/elasticsearch/datasource.js

+ 4 - 0
pkg/middleware/util.go

@@ -17,6 +17,10 @@ func Gziper() macaron.Handler {
 			return
 		}
 
+		if strings.HasPrefix(requestPath, "/api/plugin-proxy/") {
+			return
+		}
+
 		ctx.Invoke(macaronGziper)
 	}
 }

+ 3 - 1
public/app/plugins/datasource/elasticsearch/datasource.js

@@ -205,7 +205,9 @@ function (angular, _, moment, kbn, ElasticQueryBuilder, IndexPattern, ElasticRes
     };
 
     function escapeForJson(value) {
-      return value.replace(/\"/g, '\\"');
+      return value
+        .replace(/\s/g, '\\ ')
+        .replace(/\"/g, '\\"');
     }
 
     function luceneThenJsonFormat(value) {