mirror of
https://github.com/jorisvink/kore
synced 2025-03-08 19:19:02 -05:00
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.
This commit is contained in:
parent
4df120704d
commit
f47f8d3f5e
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user