浏览代码

Merge pull request #3849 from pfischermx/master

Send OpenTSDB POST request as urlencoded
Torkel Ödegaard 10 年之前
父节点
当前提交
a985f21d44
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      public/app/plugins/datasource/opentsdb/datasource.js

+ 3 - 0
public/app/plugins/datasource/opentsdb/datasource.js

@@ -72,6 +72,9 @@ function (angular, _, dateMath) {
         data: reqBody
         data: reqBody
       };
       };
 
 
+      // In case the backend is 3rd-party hosted and does not suport OPTIONS, urlencoded requests
+      // go as POST rather than OPTIONS+POST
+      options.headers = { 'Content-Type': 'application/x-www-form-urlencoded' };
       return backendSrv.datasourceRequest(options);
       return backendSrv.datasourceRequest(options);
     };
     };