2017-11-26 20:45:40 +00:00
# Insomnia Default Headers
This is a plugin for [Insomnia ](https://insomnia.rest ) that allows users to set default
headers for requests.
## Installation
2022-12-14 08:52:08 +00:00
`insomnia-plugin-default-headers` is pre-installed into Insomnia since version `2022.7.0` onwards.
2017-11-26 20:45:40 +00:00
## Usage
Headers can be added by setting a `DEFAULT_HEADERS` environment variable.
```json
{
2021-08-27 03:44:01 +00:00
"DEFAULT_HEADERS": {
"Content-Type": "application/json",
"Connection": "close"
}
2017-11-26 20:45:40 +00:00
}
2022-01-26 16:32:03 +00:00
```
2021-08-27 03:44:01 +00:00
2021-08-25 07:08:29 +00:00
Default header can be removed by setting value to null. For example, use folder environment variables to remove authorization header from anonymous calls
2021-08-27 03:44:01 +00:00
2021-08-25 07:08:29 +00:00
```json
{
"DEFAULT_HEADERS": {
"Authorization": "null"
}
}
```