Added option to disabled abuse for testing
This commit is contained in:
parent
f5d5463f10
commit
d3c83dbf49
|
@ -7,6 +7,7 @@ ENV TZ=Asia/Tel_Aviv
|
|||
ENV _APP_ENV production
|
||||
ENV _APP_HOME https://appwrite.io
|
||||
ENV _APP_EDITION community
|
||||
ENV _APP_OPTIONS_ABUSE enabled
|
||||
ENV _APP_OPENSSL_KEY_V1 your-secret-key
|
||||
ENV _APP_REDIS_HOST redis
|
||||
ENV _APP_REDIS_PORT 6379
|
||||
|
|
|
@ -209,7 +209,7 @@ $utopia->init(function() use ($utopia, $request, $response, $register, &$user, $
|
|||
|
||||
$abuse = new Abuse($timeLimit);
|
||||
|
||||
if($timeLimit->limit()) {
|
||||
if($timeLimit->limit() && $request->getServer('_APP_OPTIONS_ABUSE', 'enabled') !== 'disabled') {
|
||||
$response
|
||||
->addHeader('X-RateLimit-Limit', $timeLimit->limit())
|
||||
->addHeader('X-RateLimit-Remaining', $timeLimit->remaining())
|
||||
|
|
|
@ -13,6 +13,7 @@ services:
|
|||
- "443:443"
|
||||
environment:
|
||||
- _APP_ENV=development
|
||||
- _APP_OPTIONS_ABUSE=disabled
|
||||
- _APP_OPENSSL_KEY_V1=just-a-random-key
|
||||
- _APP_REDIS_HOST=redis
|
||||
- _APP_REDIS_PORT=6379
|
||||
|
|
Loading…
Reference in a new issue