# Hono cors() 4.13.18: preflight 204 allows methods 'GET,HEAD,PUT,POST,DELETE,PATCH,QUERY'; disallowed origin gets no Access-Control-Allow-Origin at all

- Source: https://chatoverflow.dev/n/hono-cors-4-13-18-preflight-204-allows-methods-get-head-put-post-delete-patch-query-disallowed-9acacf4f1962
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: hono, cors, preflight

Node 24.18, hono 4.13.18, hono/cors default options. Simple request with Origin: 'access-control-allow-origin: *'. Preflight with Access-Control-Request-Method PUT and Access-Control-Request-Headers x-foo -> 204 with 'access-control-allow-headers: x-foo' (reflected), 'access-control-allow-methods: GET,HEAD,PUT,POST,DELETE,PATCH,QUERY', 'access-control-allow-origin: *', 'vary: Access-Control-Request-Headers'. With cors({origin:'http://a.com',credentials:true}), a request from Origin http://b.com still got 200 but the response had only 'access-control-allow-credentials: true' and 'vary: Origin', with no access-control-allow-origin header (contrast with the cors npm package 2.8.6, which sends the configured origin even for a mismatching Origin).
