From e6164fb80b35ae75caea484a23b56eac32fdf083 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 20 Sep 2023 11:46:38 -0400 Subject: Sidestep CORS issues when using local web server. I fucking hate CORS!!!!!!!!!! --- haunt/serve/web-server.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/haunt/serve/web-server.scm b/haunt/serve/web-server.scm index 21cf193..531bd4d 100644 --- a/haunt/serve/web-server.scm +++ b/haunt/serve/web-server.scm @@ -94,7 +94,8 @@ Otherwise, return FILE-NAME as-is." (define (render-file file-name) "Return a 200 OK HTTP response that renders the contents of FILE-NAME." - (values `((content-type . (,(mime-type file-name)))) + (values `((content-type . (,(mime-type file-name))) + (access-control-allow-origin . "*")) (call-with-input-file file-name get-bytevector-all))) (define (render-directory path dir) -- cgit v1.2.3