| @@ -14,8 +14,23 @@ | ||
| 14 | 14 | * |
| 15 | 15 | * @package s2Member |
| 16 | 16 | * @since 110912 |
| 17 | 17 | */ |
| 18 | +//260904.2255 A public health request proves that this exact PHP file is reachable, then exits before loading any s2Member or WordPress code. | |
| 19 | +if(isset($_GET['s2member_health_check'])) | |
| 20 | +{ | |
| 21 | + $ws_plugin__s2member_health_token = (isset($_GET['s2member_health_token'])) ? preg_replace('/[^a-zA-Z0-9_-]/', '', substr((string)$_GET['s2member_health_token'], 0, 80)) : ''; | |
| 22 | + $ws_plugin__s2member_health_time = sprintf('%.6F', microtime(TRUE)); | |
| 23 | + header('Content-Type: text/plain; charset=UTF-8'); | |
| 24 | + header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0'); | |
| 25 | + header('Pragma: no-cache'); | |
| 26 | + header('X-s2Member-Loader: s2member-o'); //260910.0709 Keep the diagnostic identity aligned with the long-established s2member-o.php endpoint; the persisted loader option remains `s2o`. | |
| 27 | + header('X-s2Member-Health-Token: '.$ws_plugin__s2member_health_token); | |
| 28 | + header('X-s2Member-Health-Time: '.$ws_plugin__s2member_health_time); | |
| 29 | + echo 's2member-o-health:'.$ws_plugin__s2member_health_token.':'.$ws_plugin__s2member_health_time; | |
| 30 | + exit; | |
| 31 | +} | |
| 32 | + | |
| 18 | 33 | define ('_WS_PLUGIN__S2MEMBER_ONLY', TRUE); |
| 19 | 34 | |
| 20 | 35 | include_once dirname(__FILE__).'/src/includes/classes/utils-s2o.inc.php'; |
| 21 | 36 | |