summaryrefslogtreecommitdiffstats
path: root/core/views/expo.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/views/expo.py')
-rw-r--r--core/views/expo.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/views/expo.py b/core/views/expo.py
index 723f772..a77ecf6 100644
--- a/core/views/expo.py
+++ b/core/views/expo.py
@@ -493,8 +493,8 @@ def editexpopage(request, path):
if not filefound or result != html: # Check if content changed at all
edit_response = HttpResponseRedirect(reverse("expopage", args=[path])) # Redirect after POST
- edit_response.set_cookie('editor_id', editor, max_age=get_cookie_max_age()) # cookie expires after get_cookie_max_age() seconds
- print(f"Cookie set: {editor} for {get_cookie_max_age()/(3600)} hour(s)")
+ edit_response.set_cookie('editor_id', editor, max_age=get_cookie_max_age(request)) # cookie expires after get_cookie_max_age(request) seconds
+ print(f"Cookie set: {editor} for {get_cookie_max_age(request)/(3600)} hour(s)")
try:
change_message = pageform.cleaned_data["change_message"]
write_and_commit([(filepath, result, "utf-8")], f"{change_message} - online edit of {path}", editor)
@@ -610,7 +610,7 @@ def edittxtpage(request, path, filepath):
savepath = "/" + path
print(f"redirect {savepath}")
response = redirect(savepath) # Redirect after POST
- response.set_cookie('editor_id', editor, max_age=get_cookie_max_age()) # cookie expires after get_cookie_max_age() seconds
+ response.set_cookie('editor_id', editor, max_age=get_cookie_max_age(request)) # cookie expires after get_cookie_max_age(request) seconds
return response
else: