Skip to content
Browse files

Only call load-html when the file has an .html extension.

  • Loading branch information...
1 parent 19004fc commit c77df43504ce861726489f087c106497bdd59732 @brentonashworth brentonashworth committed Jan 25, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/app/clj/one/sample/dev_server.clj
View
4 src/app/clj/one/sample/dev_server.clj
@@ -31,7 +31,9 @@
remote-routes
(GET "/development" request (make-host-page request))
(GET "/production" request (make-host-page request) )
- (GET "/design*" {{file :*} :route-params} (load-html (.substring file 1)))
+ (GET "/design*" {{file :*} :route-params}
+ (when (.endsWith file ".html")
+ (load-html (.substring file 1))))
(ANY "*" request (file-response "404.html" {:root "public"})))
(defn- js-encoding [handler]

0 comments on commit c77df43

Please sign in to comment.
Something went wrong with that request. Please try again.