Commit ad56315c authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Switch probe pings to the built-in FPM one

Shortcuts ALL the PHP code, not just most of it.
parent e8c43a7c
Loading
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
access.format = "[%{%Y-%m-%dT%H:%M:%S%z}t] %{REMOTE_ADDR}e %m %{REQUEST_URI}e %s time=%{mili}d ms;"

ping.path = "/.probe"
ping.response = "OK"
+6 −0
Original line number Diff line number Diff line
@@ -44,6 +44,12 @@ server {
		fastcgi_pass upstream:9000;
	}

	location = /.probe {
		include fastcgi_params;
		add_header X-Clacks-Overhead "GNU Terry Pratchett";
		fastcgi_pass upstream:9000;
	}

	# Don't return 200 for a missing favicon
	location = /favicon.ico {
		try_files favicon.ico =404;

plugins/probe.php

deleted100644 → 0
+0 −18
Original line number Diff line number Diff line
<?php
/**
 * Plugin Name: Liveness Probe
 * Plugin URI: https://code.kodo.org.uk/singing-chimes.co.uk/wordpress/tree/master/plugins
 * Description: Responds to requests to /.probe with an HTTP code indicating the status of the app
 * Licence: MPL-2.0
 * Licence URI: https://www.mozilla.org/en-US/MPL/2.0/
 * Author: Dominik Sekotill
 * Author URI: https://code.kodo.org.uk/dom
 */


if ( parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) == '/.probe' ):

add_filter('option_active_plugins', function( $plugins ) { return array(); });
add_action('setup_theme', function() { exit(200); });

endif;