Skip to content

Commit

Permalink
Fix asset routing for PHP built-in server
Browse files Browse the repository at this point in the history
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: #910
  • Loading branch information
jtojnar committed May 6, 2017
1 parent cac783d commit f6fd94c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion run.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f6fd94c

Please sign in to comment.