From 1828cc863d271ec1935b9917357dafb695469f6b Mon Sep 17 00:00:00 2001 From: sostler Date: Sun, 23 May 2010 03:32:45 -0400 Subject: Cleaned up static routing, don't serve index.html on /static/ --- src/site.clj | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/site.clj b/src/site.clj index 4454da3..69972ed 100644 --- a/src/site.clj +++ b/src/site.clj @@ -981,12 +981,9 @@ ORDER BY msg_count DESC") ;; Compojure Routes (defn serve-static [dir path] - ; TODO: cache other static files (js, css, etc.) - (let [cache-header (if (re-find pic-regex path) - {:headers {"Cache-Control" "max-age=604800,public"}} - {})] - [cache-header - (serve-file dir path)])) + (if (= path "") + (redirect-to "http://dump.fm") + (serve-file dir path))) (defroutes static (GET "/static/*" (serve-static "static" (params :*))) -- cgit v1.2.3-70-g09d2