mirror of
https://github.com/grafana/grafana.git
synced 2025-07-28 01:02:10 +08:00
Plugins: Support set body content in plugin routes (#32551)
Adds support for overriding the body and length in plugin routes.
This commit is contained in:

committed by
GitHub

parent
027e886997
commit
aad43869c3
@ -131,6 +131,23 @@ To add URL parameters to proxied requests, use the `urlParams` property.
|
||||
]
|
||||
```
|
||||
|
||||
### Set body content
|
||||
|
||||
To set the body content and length of proxied requests, use the `body` property.
|
||||
|
||||
```json
|
||||
"routes": [
|
||||
{
|
||||
"path": "example",
|
||||
"url": "http://api.example.com",
|
||||
"body": {
|
||||
"username": "{{ .JsonData.username }}",
|
||||
"password": "{{ .SecureJsonData.password }}"
|
||||
}
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### Enable token authentication
|
||||
|
||||
To enable token-based authentication for proxied requests, use the `tokenAuth` property.
|
||||
|
Reference in New Issue
Block a user