Skip to content

Commit ed17c53

Browse files
authored
Allow all headers
1 parent 00a92f3 commit ed17c53

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/httpserver_extension.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ void HandleHttpRequest(const duckdb_httplib_openssl::Request& req, duckdb_httpli
222222
// CORS allow - set these headers for all requests
223223
res.set_header("Access-Control-Allow-Origin", "*");
224224
res.set_header("Access-Control-Allow-Methods", "GET, POST, OPTIONS, PUT");
225-
res.set_header("Access-Control-Allow-Headers", "Content-Type, X-API-Key, Authorization, X-ClickHouse-Format, format");
225+
res.set_header("Access-Control-Allow-Headers", "*");
226226
res.set_header("Access-Control-Allow-Credentials", "true");
227227
res.set_header("Access-Control-Max-Age", "86400");
228228

@@ -341,9 +341,9 @@ void HttpServerStart(DatabaseInstance& db, string_t host, int32_t port, string_t
341341
// CORS Preflight - no authentication required for OPTIONS requests
342342
global_state.server->Options(base_path,
343343
[](const duckdb_httplib_openssl::Request& /*req*/, duckdb_httplib_openssl::Response& res) {
344-
res.set_header("Access-Control-Allow-Methods", "POST, GET, OPTIONS");
344+
res.set_header("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT");
345345
res.set_header("Content-Type", "text/html; charset=utf-8");
346-
res.set_header("Access-Control-Allow-Headers", "Content-Type, X-API-Key, Authorization, X-ClickHouse-Format, format");
346+
res.set_header("Access-Control-Allow-Headers", "*");
347347
res.set_header("Access-Control-Allow-Origin", "*");
348348
res.set_header("Access-Control-Allow-Credentials", "true");
349349
res.set_header("Connection", "close");

0 commit comments

Comments
 (0)