From 54c178264008453e4fb8c656a555a3cc4798570b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=A1o=20Belica?= Date: Tue, 31 Aug 2021 21:37:56 +0200 Subject: [PATCH] docs: Use correct response header in CORS example (#185) `Access-Control-Request-Method` is a request header sent by the client (browser, ...) but we need to send response header with all allowed methods. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Request-Method https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Methods --- src/docs/markdown/caddyfile/directives/import.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/docs/markdown/caddyfile/directives/import.md b/src/docs/markdown/caddyfile/directives/import.md index 69f7fec..f5fcda6 100644 --- a/src/docs/markdown/caddyfile/directives/import.md +++ b/src/docs/markdown/caddyfile/directives/import.md @@ -32,10 +32,10 @@ Import a snippet that sets CORS headers using an import argument: (cors) { @origin header Origin {args.0} header @origin Access-Control-Allow-Origin "{args.0}" - header @origin Access-Control-Request-Method GET + header @origin Access-Control-Allow-Methods "OPTIONS,HEAD,GET,POST,PUT,PATCH,DELETE" } example.com { import cors example.com } -``` \ No newline at end of file +```