Add an HTTP Headers Plugin
This example adds an HTTP Headers Plugin to the echo-route on the echo-service. This plugin can add arbitrary headers to the outgoing request.
Add the Plugin
- Click Services on the menu.
- Click the echo-service Service.
- Click the Routes tab.
- Click the echo-route Route.
- Click the Plugins tab.
- Click the Add action icon.
- Select the "HTTP Headers" plugin type.
- Enter the Plugin description, for example "Add my custom header".
- Click the Add action icon next to "Add HTTP Headers".
- Enter "my-custom-header" in the Header name field.
- Enter "my-custom-value" in the header value field.
- Click SAVE.
Test the Configuration
- From the Console Dashboard, start the gateway or redeploy the gateway configuration.
- In your browser, enter the URL using the address of the gateway listener, for example http://nonstop-host:19091/echo. The response through the gateway should contain the custom header and value.