1
私はFlaskウェブサーバー上に構築されたvue-resourceを使ってVueJSアプリケーションを持っています。フラスコセッションを使用して非機密データを保存しようとしています。VueJSとFlaskセッション:各リクエストの新規セッション
Request.vue:
this.$http.post('/additem', postData)
.then(function success(res) {
console.log('all items after add:', res.body);
});
routes.py:
APP.config.update(
SESSION_COOKIE_HTTPONLY=False,
SECRET_KEY='speakfriend'
)
@APP.route('/', methods=['GET'])
def index():
return render_template('index.html', rawsettings=config)
@APP.route('/additem', methods=['POST'])
def add_item():
entity_id = request.form.get('entity_id')
session['items'].append(entity_id)
print('items: {}'.format(session['items']))
session.modified = True
return jsonify(session['items'])
Iは/additem
経路をヒットするたびに、応答のSet-Cookieヘッダが送信には異なるセッション鍵であります要求ヘッダー私は何が欠けていますか?