aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--module/entry-points/server.scm10
1 files changed, 8 insertions, 2 deletions
diff --git a/module/entry-points/server.scm b/module/entry-points/server.scm
index 604766a5..c671867d 100644
--- a/module/entry-points/server.scm
+++ b/module/entry-points/server.scm
@@ -148,9 +148,15 @@
;; production it isn't a huge problem.
(GET "/static/:*{.*}.:ext" (* ext)
+
+ ;; Actually parsing /etc/mime.types would be better.
+ (define mime
+ (case (string->symbol ext)
+ [(js) "javascript"]
+ [else ext]))
+
(return
- ;; TODO actually check mimetype
- `((content-type ,(string->symbol (string-append "text/" ext))))
+ `((content-type ,(string->symbol (string-append "text/" mime))))
(call-with-input-file (string-append "static/" * "." ext)
read-string)))