commit f47f8d3f5e31b789a3a22ea439d10e1dbba8cf3c
parent 4df120704db7a29884ed8dfe7e10b384ec0e3117
Author: Joris Vink <joris@sanctorum.se>
Date: Fri, 1 Dec 2023 00:33:18 +0100
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.
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git 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);