You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I installed next-session
Then I make a file in api/withsession.js
import { withSession } from 'next-session';
const handler = (req, res) => {
req.session.views = req.session.views ? (req.session.views + 1) : 1;
res.send(`In this session, you have visited this website ${req.session.views} time(s).`)
};
export default withSession(handler);
It shows this message every time I visit this page in the logs.
API resolved without sending a response for /api/withsession, this may result in a stalled requests.
The text was updated successfully, but these errors were encountered:
It is just a harmless warning and should not cause any actual error in production because the way next-session in written. I will soon update the package to avoid this warning.
I installed next-session
Then I make a file in api/withsession.js
It shows this message every time I visit this page in the logs.
API resolved without sending a response for /api/withsession, this may result in a stalled requests.
The text was updated successfully, but these errors were encountered: