Skip to content

Commit ae3fcf3

Browse files
committed
fix(aws): ensure explicit support for AWS context
1 parent de1ea8f commit ae3fcf3

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

test/index.test.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,17 @@ tap.test('Plugin#Request IP', scope => {
184184
reply.send('')
185185
})
186186

187+
instance.get('/none', (req, reply) => {
188+
t.equal(req.ip, '')
189+
t.equal(req._fastifyip, '')
190+
191+
reply.send('')
192+
})
193+
187194
done()
188195
}
189196

190-
t.plan(8)
197+
t.plan(10)
191198

192199
app.register(childscope1, { prefix: '/fallback' })
193200
app.register(childscope2, { prefix: '/no-fallback' })
@@ -223,6 +230,10 @@ tap.test('Plugin#Request IP', scope => {
223230
'x-real-ip': expectedIP
224231
}
225232
})
233+
234+
await app.inject({
235+
path: '/soft/none'
236+
})
226237
})
227238

228239
scope.test('Should infer the header based on if is AWS context', async t => {

0 commit comments

Comments
 (0)