We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4e349aa + f175388 commit fae1c9fCopy full SHA for fae1c9f
lib/server.js
@@ -47,13 +47,16 @@ function server (options = {}) {
47
const delay = Number(query.delay) || 0
48
49
const respond = () => {
50
- res.status(status).json({
51
- method,
52
- path,
53
- headers,
54
- query,
55
- body
56
- })
+ res
+ .append('x-client-ip', req.ip)
+ .status(status)
+ .json({
+ method,
+ path,
+ headers,
57
+ query,
58
+ body
59
+ })
60
}
61
62
if (delay > 0) {
package.json
@@ -1,6 +1,6 @@
1
{
2
"name": "@buzuli/httpbin",
3
- "version": "1.4.0",
+ "version": "1.5.0",
4
"description": "HTTP testing server",
5
"bin": {
6
"httpbin": "./bin/httpbin.js"
0 commit comments