From 10d879bde0552cc05e92910193d2d485e4e185c7 Mon Sep 17 00:00:00 2001 From: Frantisek Tobias Date: Wed, 18 Jun 2025 11:54:04 +0200 Subject: [PATCH] daemon/http.c: Accept any url path for DoH --- daemon/http.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/daemon/http.c b/daemon/http.c index fbfb76518..2d2399062 100644 --- a/daemon/http.c +++ b/daemon/http.c @@ -39,6 +39,10 @@ #define HTTP_FRAME_HDLEN 9 #define HTTP_FRAME_PADLEN 1 +/* accept any url path, + * otherwise only /doh and /dns-query are accepted */ +#define IGNORE_ENDPOINT + struct http_stream { int32_t id; kr_http_header_array_t *headers; @@ -114,6 +118,9 @@ static inline void set_status(struct pl_http_sess_data *ctx, enum http_status st */ static int check_uri(const char* path) { +#ifdef IGNORE_ENDPOINT + return kr_ok(); +#else static const char *endpoints[] = {"dns-query", "doh"}; ssize_t endpoint_len; ssize_t ret; @@ -138,6 +145,7 @@ static int check_uri(const char* path) } return (ret) ? kr_error(ENOENT) : kr_ok(); +#endif /* IGNORE_ENDPOINT */ } static kr_http_header_array_t *headers_dup(kr_http_header_array_t *src) -- 2.47.2