Skip to content

Commit

Permalink
add new function description
Browse files Browse the repository at this point in the history
  • Loading branch information
ljeda authored and ljeda committed Jan 12, 2025
1 parent 04a8163 commit 77145e8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 77145e8

Please sign in to comment.