mirror of
https://github.com/docmost/docmost.git
synced 2026-05-24 03:02:42 +08:00
fix request ip
This commit is contained in:
@@ -50,6 +50,14 @@ async function bootstrap() {
|
|||||||
await app.register(fastifyMultipart);
|
await app.register(fastifyMultipart);
|
||||||
await app.register(fastifyCookie);
|
await app.register(fastifyCookie);
|
||||||
|
|
||||||
|
app
|
||||||
|
.getHttpAdapter()
|
||||||
|
.getInstance()
|
||||||
|
.addHook('onRequest', (request, _reply, done) => {
|
||||||
|
(request.raw as any).ip = request.ip;
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
app
|
app
|
||||||
.getHttpAdapter()
|
.getHttpAdapter()
|
||||||
.getInstance()
|
.getInstance()
|
||||||
|
|||||||
Reference in New Issue
Block a user