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