fix: skip http validation for servers scripts in background tasks
This commit is contained in:
parent
1cf89c9bc9
commit
234b0722a2
1 changed files with 4 additions and 0 deletions
|
|
@ -101,6 +101,10 @@ def is_valid_http_method(method):
|
||||||
if frappe.flags.in_safe_exec:
|
if frappe.flags.in_safe_exec:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# Skip HTTP method validation when running in a background job
|
||||||
|
if hasattr(frappe.local, "job"):
|
||||||
|
return
|
||||||
|
|
||||||
http_method = frappe.local.request.method
|
http_method = frappe.local.request.method
|
||||||
|
|
||||||
if http_method not in frappe.allowed_http_methods_for_whitelisted_func[method]:
|
if http_method not in frappe.allowed_http_methods_for_whitelisted_func[method]:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue