Use abuse status instead of dev/prod for graphql abuse check
This commit is contained in:
parent
c23cca950a
commit
db49e962f4
|
@ -137,7 +137,7 @@ function execute(
|
|||
$flags = DebugFlag::INCLUDE_DEBUG_MESSAGE | DebugFlag::INCLUDE_TRACE;
|
||||
$validations = GraphQL::getStandardValidationRules();
|
||||
|
||||
if (App::isProduction()) {
|
||||
if (App::getEnv('_APP_OPTIONS_ABUSE', 'enabled') !== 'disabled') {
|
||||
$validations[] = new DisableIntrospection();
|
||||
$validations[] = new QueryComplexity($maxComplexity);
|
||||
$validations[] = new QueryDepth($maxDepth);
|
||||
|
|
|
@ -20,8 +20,8 @@ class AbuseTest extends Scope
|
|||
{
|
||||
parent::setUp();
|
||||
|
||||
if (App::isDevelopment()) {
|
||||
$this->markTestSkipped('Skipping abuse test in development environment');
|
||||
if (App::getEnv('_APP_OPTIONS_ABUSE') === 'disabled') {
|
||||
$this->markTestSkipped('Abuse is not enabled.');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue