Merge pull request #38891 from ShrihariMahabal/skip-http-validation-for-bg-tasks

fix: skip http validation for servers scripts in background tasks
This commit is contained in:
Shrihari Mahabal 2026-04-25 12:51:37 +05:30 committed by GitHub
commit 2e0a8f19f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -101,6 +101,10 @@ def is_valid_http_method(method):
if frappe.flags.in_safe_exec:
return
# Skip HTTP method validation when running in a background job
if hasattr(frappe.local, "job"):
return
http_method = frappe.local.request.method
if http_method not in frappe.allowed_http_methods_for_whitelisted_func[method]: