Skip to content

Commit

Permalink
OPTIONS requests should never get here.
Browse files Browse the repository at this point in the history
  • Loading branch information
kohler committed Feb 8, 2024
1 parent fa7e134 commit 0a03972
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,7 @@ function initialize_request($kwarg = null) {
// check method
if ($qreq->method() !== "GET"
&& $qreq->method() !== "POST"
&& $qreq->method() !== "HEAD"
&& ($qreq->method() !== "OPTIONS" || $nav->page !== "api")) {
&& $qreq->method() !== "HEAD") {
header("HTTP/1.0 405 Method Not Allowed");
exit;
}
Expand Down

0 comments on commit 0a03972

Please sign in to comment.