質問編集履歴
1
不備があったため変更しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -38,13 +38,13 @@
|
|
38
38
|
//post.js
|
39
39
|
exports.index = function(req, res){
|
40
40
|
//Session処理
|
41
|
-
req.session.
|
41
|
+
req.session.id = "apple";
|
42
|
-
res.render('posts/index.ejs',{fruit:req.session.
|
42
|
+
res.render('posts/index.ejs',{fruit:req.session.id});
|
43
43
|
};
|
44
44
|
```
|
45
45
|
```html
|
46
46
|
//index.ejs
|
47
|
-
<p><%=
|
47
|
+
<p><%= id %></p> <!--結果:VkRursEhMEWq8cqxTYdJTFbwPBST-UOO-->
|
48
48
|
```
|
49
49
|
上記の様にindex.ejsファイルに渡したsessionが暗号化されたまま表示されてしまいます。
|
50
50
|
何か自分のコードに不備等ございますでしょうか?
|