mirror of
https://github.com/Kong/insomnia.git
synced 2026-04-23 07:38:58 -04:00
34 lines
806 B
Markdown
34 lines
806 B
Markdown
# Insomnia Default Headers
|
|
|
|
[](https://www.npmjs.com/package/insomnia-plugin-default-headers)
|
|
|
|
This is a plugin for [Insomnia](https://insomnia.rest) that allows users to set default
|
|
headers for requests.
|
|
|
|
## Installation
|
|
|
|
Install the `insomnia-plugin-default-headers` plugin from Preferences > Plugins.
|
|
|
|
## Usage
|
|
|
|
Headers can be added by setting a `DEFAULT_HEADERS` environment variable.
|
|
|
|
```json
|
|
{
|
|
"DEFAULT_HEADERS": {
|
|
"Content-Type": "application/json",
|
|
"Connection": "close"
|
|
}
|
|
}
|
|
```
|
|
|
|
Default header can be removed by setting value to null. For example, use folder environment variables to remove authorization header from anonymous calls
|
|
|
|
```json
|
|
{
|
|
"DEFAULT_HEADERS": {
|
|
"Authorization": "null"
|
|
}
|
|
}
|
|
```
|