mirror of
https://github.com/bitinflow/localtunnel.git
synced 2026-10-31 20:59:08 +00:00
fix unnecessary binary->string conversion
This commit is contained in:
1 parent
649de1b840
commit
b32041d8aa
1 file changed
+1
-1
@@ -19,11 +19,11 @@ util.inherits(HeaderHostTransformer, Transform);
|
||||
|
||||
HeaderHostTransformer.prototype._transform = function (chunk, enc, cb) {
|
||||
var self = this;
|
||||
chunk = chunk.toString();
|
||||
|
||||
// after replacing the first instance of the Host header
|
||||
// we just become a regular passthrough
|
||||
if (!self.replaced) {
|
||||
chunk = chunk.toString();
|
||||
self.push(chunk.replace(/(\r\nHost: )\S+/, function(match, $1) {
|
||||
self.replaced = true;
|
||||
return $1 + self.host;
|
||||
|
||||
Reference in new issue
Block a user