Spaces:
Running
Running
David Ko
commited on
Commit
ยท
d5410d2
1
Parent(s):
4ba39ac
Do not modify session in serve_index_html to avoid extending expiry; honor absolute 2-min expiry
Browse files
api.py
CHANGED
@@ -1270,10 +1270,8 @@ def serve_index_html():
|
|
1270 |
# ์ธ์
์ํ ๋๋ฒ๊ทธ
|
1271 |
print(f"Session data: user_id={session.get('user_id')}, username={session.get('username')}, is_permanent={session.get('permanent', False)}")
|
1272 |
|
1273 |
-
# ์ธ์
|
1274 |
-
session
|
1275 |
-
session['username'] = current_user.username
|
1276 |
-
session.modified = True
|
1277 |
|
1278 |
# index.html์ ์ฝ์ด ํํธ๋นํธ ์คํฌ๋ฆฝํธ๋ฅผ ์ฃผ์
|
1279 |
index_path = os.path.join(app.static_folder, 'index.html')
|
|
|
1270 |
# ์ธ์
์ํ ๋๋ฒ๊ทธ
|
1271 |
print(f"Session data: user_id={session.get('user_id')}, username={session.get('username')}, is_permanent={session.get('permanent', False)}")
|
1272 |
|
1273 |
+
# ์ธ์
๋ง๋ฃ๋ฅผ ์๋๋๋ก ์ ์งํ๊ธฐ ์ํด ์ฌ๊ธฐ์ ์ธ์
์ ๊ฐฑ์ ํ์ง ์์ต๋๋ค.
|
1274 |
+
# ์ฃผ์: ์ธ์
์ ์ฐ๊ธฐ(๋๋ session.modified=True)๋ Flask-Session์์ ๋ง๋ฃ์๊ฐ์ ์ฐ์ฅํ ์ ์์ต๋๋ค.
|
|
|
|
|
1275 |
|
1276 |
# index.html์ ์ฝ์ด ํํธ๋นํธ ์คํฌ๋ฆฝํธ๋ฅผ ์ฃผ์
|
1277 |
index_path = os.path.join(app.static_folder, 'index.html')
|