The my-css-function
returns a string, which compojure returns as the content for the response, if no content-type is explicitly specified then my guess is that either text/plain
or text/html
are used.
If you want to specify the text/css
content type for the response, you could do it in the following way:
(defn my-css-function []
{:headers {"Content-Type" "text/css"}
:body "body { background-color: #CCC; }"})