minimalistic-server 0.0.41 → 0.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +4 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -3,8 +3,6 @@ import * as querystring from "node:querystring";
|
|
|
3
3
|
import * as fs from "node:fs/promises";
|
|
4
4
|
import * as tls from "node:tls";
|
|
5
5
|
import * as nodeCrypto from "node:crypto";
|
|
6
|
-
import { isTypedArray } from 'node:util/types';
|
|
7
|
-
import { inspect } from 'node:util';
|
|
8
6
|
|
|
9
7
|
const servers = new Map();
|
|
10
8
|
const keepAliveTimeout = 20000;
|
|
@@ -825,6 +823,10 @@ export class Request {
|
|
|
825
823
|
return this.#headers;
|
|
826
824
|
}
|
|
827
825
|
|
|
826
|
+
getIp() {
|
|
827
|
+
return this.#request.socket.remoteAddress;
|
|
828
|
+
}
|
|
829
|
+
|
|
828
830
|
getPort() {
|
|
829
831
|
return this.#request.socket.address().port;
|
|
830
832
|
}
|