From c10316630e0d33d9672460ea3d2d8faf1d589c6a Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Sun, 22 Dec 2024 14:42:47 +1300 Subject: [PATCH] tweak route so all the search engine spiders get 404 when retrieving post_options #394 --- app/post/routes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/post/routes.py b/app/post/routes.py index 4b94f67b..78566339 100644 --- a/app/post/routes.py +++ b/app/post/routes.py @@ -680,7 +680,7 @@ def add_reply(post_id: int, comment_id: int): inoculation=inoculation[randint(0, len(inoculation) - 1)] if g.site.show_inoculation_block else None) -@bp.route('/post//options', methods=['GET']) +@bp.route('/post//options_menu', methods=['GET']) def post_options(post_id: int): post = Post.query.get_or_404(post_id) if post.deleted: @@ -701,7 +701,7 @@ def post_options(post_id: int): menu_topics=menu_topics(), site=g.site) -@bp.route('/post//comment//options', methods=['GET']) +@bp.route('/post//comment//options_menu', methods=['GET']) def post_reply_options(post_id: int, comment_id: int): post = Post.query.get_or_404(post_id) post_reply = PostReply.query.get_or_404(comment_id)