mirror of https://git.kore.io/kore.git
limit filemaps to HEAD/GET requests.
This commit is contained in:
parent
d876e41ebb
commit
f2c87fd130
|
@ -89,6 +89,13 @@ filemap_resolve(struct http_request *req)
|
|||
size_t best_len;
|
||||
struct filemap_entry *entry, *best;
|
||||
|
||||
if (req->method != HTTP_METHOD_GET &&
|
||||
req->method != HTTP_METHOD_HEAD) {
|
||||
http_response_header(req, "allow", "get, head");
|
||||
http_response(req, HTTP_STATUS_BAD_REQUEST, NULL, 0);
|
||||
return (KORE_RESULT_OK);
|
||||
}
|
||||
|
||||
best = NULL;
|
||||
best_len = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue