From f6fd94cd9fb69bd8fa16aa94f3aa52e69cb4110e Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sat, 6 May 2017 20:28:28 +0200 Subject: [PATCH] Fix asset routing for PHP built-in server Pull request #907 switched to using query string as a cache busting strategy but the runner for the PHP built-in server did not anticipate any text after file name extension. See also: https://github.com/SSilence/selfoss/issues/910 --- run.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.php b/run.php index 67a0a38461..dc69bf476c 100644 --- a/run.php +++ b/run.php @@ -2,7 +2,7 @@ // Only run this if running from php 5.4 embedded server if (php_sapi_name() == 'cli-server') { - if (preg_match('/\.(?:js|ico|gif|jpg|png|css|asc|txt|eot|woff|ttf|ttf|svg)$/', $_SERVER['REQUEST_URI'])) { + if (preg_match('/\.(?:js|ico|gif|jpg|png|css|asc|txt|eot|woff|ttf|ttf|svg)(?:\?.*)?$/', $_SERVER['REQUEST_URI'])) { // serves fronted if (preg_match('/^\/public/', $_SERVER['REQUEST_URI'])) { return false;