summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsostler <sbostler@gmail.com>2010-05-23 03:32:45 -0400
committersostler <sbostler@gmail.com>2010-05-23 03:32:45 -0400
commit1828cc863d271ec1935b9917357dafb695469f6b (patch)
tree21dd00bcfd94dac32fbc054593e229c625d5ca39 /src
parent45a59a082d1485d5bf370b79d23d7d535e9fa645 (diff)
Cleaned up static routing, don't serve index.html on /static/
Diffstat (limited to 'src')
-rw-r--r--src/site.clj9
1 files changed, 3 insertions, 6 deletions
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 :*)))