Skip to content

Commit

Permalink
Add clientAddress when rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
NuroDev committed Dec 7, 2024
1 parent 6c04a9b commit a6f1c57
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package/src/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function handler(

const app = new App(manifest);

return (req: Request) => {
return (req: Request, server: Server) => {
const routeData = app.match(req);
if (!routeData) {
const url = new URL(req.url);
Expand All @@ -87,6 +87,7 @@ function handler(

return app.render(req, {
addCookieHeader: true,
clientAddress: server.requestIP(req)?.address,
routeData,
});
};
Expand Down

0 comments on commit a6f1c57

Please sign in to comment.