Skip to content

Commit

Permalink
Prevent enabling debug mode on local env
Browse files Browse the repository at this point in the history
  • Loading branch information
aswasif007 committed Mar 18, 2024
1 parent 3bf5d2d commit 04b8e97
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions 000-debug/debug-mode.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ function is_debug_mode_enabled() {
$is_nocache = isset( $_COOKIE['vip-go-cb'] ) && '1' === $_COOKIE['vip-go-cb']; // phpcs:ignore WordPressVIPMinimum.Variables.RestrictedVariables.cache_constraints___COOKIE
$is_debug = isset( $_COOKIE['a8c-debug'] ) && '1' === $_COOKIE['a8c-debug']; // phpcs:ignore WordPressVIPMinimum.Variables.RestrictedVariables.cache_constraints___COOKIE
$is_proxied = \is_proxied_request();
$is_local = function_exists( 'is_local_env' ) && \is_local_env();

if ( ( $is_nocache && $is_debug && $is_proxied ) || $is_local ) {
if ( $is_nocache && $is_debug && $is_proxied ) {
return true;
}

Expand Down

0 comments on commit 04b8e97

Please sign in to comment.