我在我的NextJS应用程序中使用with-铁会话进行身份验证,但是当我在getServerSideProps()函数中进行API调用时,我无法访问会话cookie。API路由无法获得用于身份验证的会话cookie:// this file is a wrapper with defaults to be used in both API routesand `getServerSidePro
我试图在客户端getCookie上从cookies-next获得cookie,我面临的问题是,在初始呈现时,next.js与错误Cannot read properties of undefined一起崩溃,但是在控制台cookie中总是有一些价值。当我试图使用getServerSideProps从服务器传递cookie时,我从eslint Async arrow function 'getServ
如果我在getServerSideProps中使用标准的redis npm模块,我会得到错误net.isIP is not a function。根据我的研究,这是由于客户端尝试使用redis函数造成的。 我正在尝试创建一个应用程序,在该应用程序中,会话数据基于cookie令牌保存在redis密钥中。根据用户Id调用数据库,并将数据呈现给组件。我可以在getServerSideProps中<
你好,我是nextjs的新手,我正在与django、drf和postgres一起使用它。问题是,我不能使用在profile.js文件之上导入getStaticProps的‘js’,getServerSideProps也不像这样:import Cookies from 'js-cookie'
import jwt_decode from 'jwt-decod