* feat: Implement optional URL path sanitization in BackendSrv methods
* add comment
* revert
* remove namespace import from backendsrv
* change method to validatePath, remove query params and fragments
* Moved validatePath call into fetch and make it throw an error instead
* update pluginSettings tests
* prettier
* Update public/app/features/plugins/pluginSettings.ts
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
* change name to validatePath
* fix other tests
* rename property in backend_srv tests
* rename to validatePath in backend_srv, add extra tests
* Move path validation into parseUrlFromOptions
* fix
* Add additional check
* Add test
---------
Co-authored-by: joshhunt <josh.hunt@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
* feat(nameHeaders): add feature flag
* add safe parsing of headers
* use headers in loki datasource
* Loki: add option to pass headers to Loki
* Loki: add datasource tests for dashboard names
* cleanup
* DataSourceWithBackend: add test
* rename to `sanitizeHeader`
* Loki: add condition when to add headers
* Loki: add e2e tests
* Loki: change test name
* WIP
* Finish getting form to populate
* WIP API
* Get PUT to work although the edit doesnt apply yet
* Complete working PUT
* PATCH v1 no json patch
* This works!
* Fix headers to be configurable
* Fix translations
* Revert "This works!"
This reverts commit d57ffcbc4bcf4fdaa414739838ce2377ca65a480.
# Conflicts:
# public/app/features/query-library/api/factory.ts
# public/app/features/query-library/api/query.ts
# public/app/features/query-library/types.ts
* Use normal method of patching 😅
* Replace add to library form with generic version
* make translations generic
* Rename function, fix bad conflict resolution
* fix any's in tests
* fix more any's in tests
* more test type fixes
* fixing any's in tests part 3
* more test type fixes
* fixing test any's p5
* some tidy up
* fix template_srv
The fetch() API won't send cookies or other type of credentials unless
you set the credentials init option. Some datasources like Prometheus
and Elasticsearch have `withCredentials` option in Browser access mode,
but this option is not currently getting passed in the fetch() API.
Fixes#23338.