|
@ -21,14 +21,6 @@ base_path = os.path.expanduser( |
|
|
"~") + "/frappe-bench/sites/" + site_name + "/public" |
|
|
"~") + "/frappe-bench/sites/" + site_name + "/public" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@frappe.whitelist(allow_guest=True) |
|
|
|
|
|
def masters1(): |
|
|
|
|
|
rate_res = custom_rate_limit(limit=5, seconds=10) |
|
|
|
|
|
if rate_res != 1: |
|
|
|
|
|
return rate_res |
|
|
|
|
|
return 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def custom_rate_limit(limit, seconds): |
|
|
def custom_rate_limit(limit, seconds): |
|
|
ip_based = True |
|
|
ip_based = True |
|
|
ip = frappe.local.request_ip if ip_based is True else None |
|
|
ip = frappe.local.request_ip if ip_based is True else None |
|
|