mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Elasticsearch: Run getTerms trough resource call if enableElasticsearchBackendQuerying enabled (#67848)
* Elasticsearch: Run getTerms torugh backend if toggle enabled * Add template variables to devenv dashboard for easier testing * Add TODO * Run feature toggle gen to fix build
This commit is contained in:
@@ -183,8 +183,9 @@ func (s *Service) CallResource(ctx context.Context, req *backend.CallResourceReq
|
||||
logger := eslog.FromContext(ctx)
|
||||
// allowed paths for resource calls:
|
||||
// - empty string for fetching db version
|
||||
// - /?/_mapping for fetching index mapping
|
||||
if req.Path != "" && !strings.HasSuffix(req.Path, "/_mapping") {
|
||||
// - ?/_mapping for fetching index mapping
|
||||
// - _msearch for executing getTerms queries
|
||||
if req.Path != "" && !strings.HasSuffix(req.Path, "/_mapping") && req.Path != "_msearch" {
|
||||
return fmt.Errorf("invalid resource URL: %s", req.Path)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user