Last active
July 18, 2023 15:22
-
-
Save pstoute/6994f0c83521f1aae714f49d1a729757 to your computer and use it in GitHub Desktop.
Add this to your /wp-content/mu-plugins/ directory to allow the eBridge or JitterBit connections to your Fortress Secured WordPress site.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: GridPane Fortress - Overrrides for eBridge/JitterBit connections | EMEA Region | |
* Description: Companion plugin to the Fortress Security module to whitelist eBridge/JitterBit connections. | |
* Author: Stoute Web Solutions | |
* Author URI: https://stoutewebsolutions.com | |
* Version: 1.0 | |
*/ | |
// This is a replication of the original whitelisted module for ManageWP found here: https://github.com/snicco/fortress/blob/beta/docs/modules/session/sudo-mode.md#skipping-the-sudo-mode-check-for-request-from-managewp | |
use Snicco\Enterprise\Fortress\Session\Infrastructure\Event\ShouldSudoModeCheckBeSkipped; | |
add_action(ShouldSudoModeCheckBeSkipped::class, function (ShouldSudoModeCheckBeSkipped $event) { | |
// Alloy IPs provided by the eBridge/JitterBit Technical team. Your specific IP addresses may be different and should be confirmed with your eBridge/JitterBit account rep. | |
$ips = [ | |
'13.69.132.177', | |
'20.50.64.12', | |
'20.54.48.95', | |
'20.54.48.105', | |
'20.54.48.113', | |
'20.54.48.122', | |
'20.54.48.130', | |
'20.54.48.159', | |
'20.54.48.196', | |
'20.54.48.210', | |
'20.54.48.219', | |
'20.54.48.241', | |
'20.54.49.10', | |
'20.67.184.104', | |
'20.67.185.55', | |
'20.67.185.96', | |
'20.67.185.153', | |
'20.67.185.206', | |
'20.67.185.221', | |
'20.67.185.228', | |
'20.67.185.250', | |
'20.67.186.42', | |
'20.67.186.48', | |
'20.67.186.50', | |
'20.67.186.64', | |
'20.223.170.216', | |
'51.104.183.88', | |
'51.104.183.94', | |
'51.104.183.101', | |
'51.104.183.103', | |
'51.104.183.106', | |
'51.104.183.115', | |
'51.104.183.229', | |
'74.234.104.88', | |
'74.234.110.122', | |
'168.63.70.160' | |
]; | |
if(in_array($_SERVER['REMOTE_ADDR'], $ips, true)){ | |
$event->skip_for_current_request = true; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment