From e2ebffd401190599b18b708a70a686731d071a99 Mon Sep 17 00:00:00 2001 From: Ahmad Sadeddin Date: Fri, 26 Jan 2024 10:26:04 -0800 Subject: [PATCH 1/2] Corgea's fix for issue e1f139a2-2658-4609-a0c1-8190f175e105 --- posthog/settings/web.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/posthog/settings/web.py b/posthog/settings/web.py index 08c7f007696..3cc009e278e 100644 --- a/posthog/settings/web.py +++ b/posthog/settings/web.py @@ -239,6 +239,15 @@ X_FRAME_OPTIONS = "SAMEORIGIN" REST_FRAMEWORK = { + 'DEFAULT_THROTTLE_CLASSES': [ + 'rest_framework.throttling.AnonRateThrottle', + 'rest_framework.throttling.UserRateThrottle' + ], + 'DEFAULT_THROTTLE_RATES': { + 'anon': '100/hour', + 'user': '1000/hour' + }, +} "DEFAULT_AUTHENTICATION_CLASSES": [ "posthog.auth.PersonalAPIKeyAuthentication", "rest_framework.authentication.BasicAuthentication", From b817eec7540c99d96174c3a41c0b7cd420034e60 Mon Sep 17 00:00:00 2001 From: Ahmad Sadeddin Date: Fri, 26 Jan 2024 12:21:47 -0800 Subject: [PATCH 2/2] Update web.py --- posthog/settings/web.py | 1 - 1 file changed, 1 deletion(-) diff --git a/posthog/settings/web.py b/posthog/settings/web.py index 3cc009e278e..5db9b238ca7 100644 --- a/posthog/settings/web.py +++ b/posthog/settings/web.py @@ -247,7 +247,6 @@ 'anon': '100/hour', 'user': '1000/hour' }, -} "DEFAULT_AUTHENTICATION_CLASSES": [ "posthog.auth.PersonalAPIKeyAuthentication", "rest_framework.authentication.BasicAuthentication",