egg-global-header
Egg plugin for setting response header globally.
Install
$ npm install --save egg-global-header
Usage
// {app_root}/config/plugin.jsexportsglobalHeader = enable: true package: 'egg-global-header';
Configuration
Set the response key-value pairs in the plugin configuration:
// {app_root}/config/config.default.jsexportsglobalHeader = 'Powered-by': '23333' 'Cache-Control': 'no-cache';
Hint: The header set by egg-global-header won't overwrite existing response header(s).
E.g. if you set
Powered-by
in other place (maybe in controller or other plugins), then your ownPowered-by
header will be responsed.
Questions && Suggestions
Please open an issue here.