Skip to content

Commit d2e5422

Browse files
committed
add: request IP to logging in mercuriusPlugin
1 parent 52403f4 commit d2e5422

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/velog-server/src/common/plugins/global/mercuriusPlugin.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const mercuriusPlugin: FastifyPluginAsync = async (fastify) => {
4545
requestbody: request?.body,
4646
result,
4747
user: request?.user,
48+
ip: request?.ip,
4849
}),
4950
)
5051
.catch(console.error)
@@ -65,6 +66,7 @@ const mercuriusPlugin: FastifyPluginAsync = async (fastify) => {
6566
requestbody: (ctx as any).request?.body,
6667
execution,
6768
user: (ctx as any).request?.user,
69+
ip: (ctx as any).request?.ip,
6870
}),
6971
)
7072
.catch(console.error)

0 commit comments

Comments
 (0)