0
나는 reactjs에서 새로운 shopify 응용 프로그램을 만드는 데이 라이브러리를 사용하고 있습니다. https://github.com/fullstackreact/food-lookup-demo여러 경로가있는 빠른 세션 문제가 정의되지 않았습니다.
하지만 예를 들어 여러 경로로 작동하지의 세션을 사용하려고 할 때 :
req.session.shop = 'yshop'; set in shopify file and when I am trying to get
console.log(req.session.shop); in another routes file its showing undefined.
server.js 코드 :
app.set('trust proxy', 1) // trust first proxy
app.use(session({
secret: "[email protected][email protected]#$D&W",
resave: true,
saveUninitialized: true,
proxy: true,
cookie: { secure: true, maxAge: 60000 }
}));
그것이 작동하지, 누군가가 나를 도울를?
그래 내가이 문제를 해결하도록하겠습니다. –
아니요 작동하지 않습니다. 여전히 console.log에 정의되지 않음을 표시합니다. –
differents 경로를 표시 할 수 있습니까? – Sparw