From f47f8d3f5e31b789a3a22ea439d10e1dbba8cf3c Mon Sep 17 00:00:00 2001 From: Joris Vink Date: Fri, 1 Dec 2023 00:33:18 +0100 Subject: [PATCH] Missing options for HTTP method restrictions. While Kore supports the OPTIONS method, it was not possible to specify this in the route methods configuration. Pointed out via discord. --- src/config.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/config.c b/src/config.c index 3bc2109..2c154ef 100644 --- a/src/config.c +++ b/src/config.c @@ -1255,6 +1255,8 @@ configure_route_methods(char *options) current_route->methods |= HTTP_METHOD_HEAD; } else if (!strcasecmp(argv[i], "patch")) { current_route->methods |= HTTP_METHOD_PATCH; + } else if (!strcasecmp(argv[i], "options")) { + current_route->methods |= HTTP_METHOD_OPTIONS; } else { kore_log(LOG_ERR, "unknown method: %s in method for %s", argv[i], current_route->path);