summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2023-09-20 11:46:38 -0400
committerDavid Thompson <dthompson2@worcester.edu>2023-09-20 11:46:38 -0400
commite6164fb80b35ae75caea484a23b56eac32fdf083 (patch)
tree4435d59a08326f8f0466ab8e655dc214a4654f7d
parent21c42377dc5774b8c2a1999abcec85bd1253e656 (diff)
Sidestep CORS issues when using local web server.
I fucking hate CORS!!!!!!!!!!
-rw-r--r--haunt/serve/web-server.scm3
1 files changed, 2 insertions, 1 deletions
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)