diff --git a/README.rst b/README.rst index d368972..d451013 100644 --- a/README.rst +++ b/README.rst @@ -29,8 +29,8 @@ import and configure the library with your Castle API secret. # For authenticate method you can set failover strategies: allow(default), deny, challenge, throw configuration.failover_strategy = 'deny' - # Castle::RequestError is raised when timing out in milliseconds (default: 500 milliseconds) - configuration.request_timeout = 1000 + # Castle::RequestError is raised when timing out in milliseconds (default: 1000 milliseconds) + configuration.request_timeout = 1500 # Base Castle API url # configuration.base_url = "https://api.castle.io/v1" diff --git a/castle/configuration.py b/castle/configuration.py index 476623a..8bcd1f2 100644 --- a/castle/configuration.py +++ b/castle/configuration.py @@ -30,8 +30,8 @@ # API endpoint BASE_URL = 'https://api.castle.io/v1' FAILOVER_STRATEGY = 'allow' -# 500 milliseconds -REQUEST_TIMEOUT = 500 +# 1000 milliseconds +REQUEST_TIMEOUT = 1000 # regexp of trusted proxies which is always appended to the trusted proxy list FAILOVER_STRATEGIES = ['allow', 'deny', 'challenge', 'throw'] TRUSTED_PROXIES = [r""" diff --git a/castle/test/configuration_test.py b/castle/test/configuration_test.py index 9af0c9e..32f8415 100644 --- a/castle/test/configuration_test.py +++ b/castle/test/configuration_test.py @@ -13,7 +13,7 @@ def test_default_values(self): self.assertEqual(config.base_url.path, '/v1') self.assertEqual(config.allowlisted, []) self.assertEqual(config.denylisted, []) - self.assertEqual(config.request_timeout, 500) + self.assertEqual(config.request_timeout, 1000) self.assertEqual(config.failover_strategy, 'allow') self.assertEqual(config.ip_headers, []) self.assertEqual(config.trusted_proxies, [])