Skip to content

Commit b81c6e7

Browse files
committed
Merge pull request reactjs#50 from michaeldhopkins/patch-1
Update server.php
2 parents 909d70e + 162e4fb commit b81c6e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function routeRequest()
2121
case '/':
2222
echo file_get_contents('./public/index.html');
2323
break;
24-
case '/comments.json':
24+
case (preg_match('/comments.json*/', $_SERVER["REQUEST_URI"]) ? true : false):
2525
if($_SERVER['REQUEST_METHOD'] === 'POST') {
2626
$commentsDecoded = json_decode($comments, true);
2727
$commentsDecoded[] = ['author' => $_POST['author'],

0 commit comments

Comments
 (0)