Loading data/fpm.conf +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" data/nginx.conf +6 −0 Original line number Diff line number Diff line Loading @@ -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; Loading plugins/probe.phpdeleted 100644 → 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; Loading
data/fpm.conf +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"
data/nginx.conf +6 −0 Original line number Diff line number Diff line Loading @@ -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; Loading
plugins/probe.phpdeleted 100644 → 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;