diff --git a/index.js b/index.js index 5a86b42..a7d0083 100644 --- a/index.js +++ b/index.js @@ -207,6 +207,11 @@ function createRedirectDirectoryListener () { } } +/** + * Set default value for the header only if it is not already set in the response + * @private + */ + function setHeaderIfNotSet (res, name, value) { if (!res.hasHeader(name)) { res.setHeader(name, value)