]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] Allow 'Hash' in Access-Control-Allow-Headers
authorAlexander Moisseev <moiseev@mezonplus.ru>
Wed, 7 May 2025 15:29:05 +0000 (18:29 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Wed, 7 May 2025 15:29:05 +0000 (18:29 +0300)
so clients can include the Hash header in CORS preflight requests
to /fuzzydelhash endpoint.

src/controller.c

index 22423e9990f144cdae0a74028f87dc3309e90a9d..c64835038b974d8f6d11a5084a04ca92957c7d27 100644 (file)
@@ -3291,7 +3291,7 @@ rspamd_controller_handle_unknown(struct rspamd_http_connection_entry *conn_ent,
                rspamd_http_message_add_header(rep, "Access-Control-Allow-Methods",
                                                                           "POST, GET, OPTIONS");
                rspamd_http_message_add_header(rep, "Access-Control-Allow-Headers",
-                                                                          "Content-Type,Password,Map,Weight,Flag");
+                                                                          "Content-Type,Password,Map,Weight,Flag,Hash");
                rspamd_http_connection_reset(conn_ent->conn);
                rspamd_http_router_insert_headers(conn_ent->rt, rep);
                rspamd_http_connection_write_message(conn_ent->conn,