mirror of
https://github.com/joelwmale/webhook-action.git
synced 2024-11-26 09:25:24 +01:00
12 lines
357 B
JavaScript
12 lines
357 B
JavaScript
'use strict';
|
|
|
|
var utils = require('../utils');
|
|
|
|
module.exports = function normalizeHeaderName(headers, normalizedName) {
|
|
utils.forEach(headers, function processHeader(value, name) {
|
|
if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
|
|
headers[normalizedName] = value;
|
|
delete headers[name];
|
|
}
|
|
});
|
|
};
|