Added missing period in allowed hostname chars

Allowed hostname chars should include A-Za-z0-9-. based on https://man7.org/linux/man-pages/man7/hostname.7.html
This commit is contained in:
chadjw
2022-03-21 10:42:21 -04:00
committed by Julian Lam
parent 53952041d1
commit 0acb2fcfe4

View File

@@ -66,7 +66,7 @@ module.exports = function (middleware) {
}
if (process.env.NODE_ENV === 'development') {
headers['X-Upstream-Hostname'] = os.hostname().replace(/[^0-9A-Za-z-]/g, '');
headers['X-Upstream-Hostname'] = os.hostname().replace(/[^0-9A-Za-z-.]/g, '');
}
for (const [key, value] of Object.entries(headers)) {