change HTTP 301 to 303 for response of POST to /comment

This commit is contained in:
2025-06-23 05:48:15 -07:00
parent 763f0853bf
commit 26451e486d

View File

@ -112,7 +112,7 @@
(.write f f"<div class=\"comment\"><span style=\"font-weight: bold\">{(if (and site site-valid?) f"<a href=\"{(clean protocol)}://{(clean domain)}{(clean path)}\">" "")}{(clean name)}{(if (and site site-valid?) "</a>" "")}</span> at {(.strftime now "%Y-%m-%d %H:%M:%S")}:<br><pre>{(clean comment)}</pre></div>"))
(return (dict
:code 301
:code 303
:headers {"Location" (. request (get "headers") (get "Referer"))})))
(= method "GET") (error 405 "method not allowed")))