diff --git a/webroot/index.php b/webroot/index.php
index 55d1ebe..1f57a87 100644
--- a/webroot/index.php
+++ b/webroot/index.php
@@ -22,7 +22,7 @@ Flight::route("POST /polls", function () {
Flight::halt(403, "
403 Forbidden
Invalid Content-Type.
");
});
-Flight::route("GET /polls/@id:[a-fA-F0-9]+", function ($id) {
+Flight::route("HEAD|GET /polls/@id:[a-fA-F0-9]+", function ($id) {
global $VERLAINE;
$poll = Poll::load_poll($id);
if ($poll)
@@ -95,7 +95,7 @@ Flight::route("POST /polls/@id:[a-fA-F0-9]+/vote", function ($id) {
Flight::notFound();
});
-Flight::route("GET /polls/@id:[a-fA-F0-9]+/results", function ($id) {
+Flight::route("HEAD|GET /polls/@id:[a-fA-F0-9]+/results", function ($id) {
global $VERLAINE;
$poll = Poll::load_poll($id);
if ($poll)
@@ -138,13 +138,11 @@ Flight::route("GET|DELETE /polls/@id:[a-fA-F0-9]+/@token:[a-fA-F0-9]+", function
Flight::notFound();
});
-Flight::route("GET /polls/@id:[a-fA-F0-9]+/results/svg", function ($id) {
+Flight::route("HEAD|GET /polls/@id:[a-fA-F0-9]+/results/svg", function ($id) {
global $VERLAINE;
$poll = Poll::load_poll($id);
if ($poll)
- {
Flight::render("svg/results", ["poll" => $poll, "colors" => $VERLAINE["chart_colors"]]);
- }
else
Flight::notFound();
});