fix: only allow POST in some api/v2/ methods

This commit is contained in:
Sagar Vora 2025-11-21 17:46:21 +05:30
parent 9c6594b47c
commit 35077703a0

View file

@ -271,9 +271,9 @@ def run_doc_method(method: str, document: dict[str, Any] | str, kwargs=None):
url_rules = [
# RPC calls
Rule("/method/login", endpoint=login),
Rule("/method/logout", endpoint=logout),
Rule("/method/logout", endpoint=logout, methods=["POST"]),
Rule("/method/ping", endpoint=frappe.ping),
Rule("/method/upload_file", endpoint=upload_file),
Rule("/method/upload_file", endpoint=upload_file, methods=["POST"]),
Rule("/method/<method>", endpoint=handle_rpc_call),
Rule(
"/method/run_doc_method",