Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Load static content from classpath

This lets us run from a single standalone jar.
  • Loading branch information...
commit 527679ffb588bd87c48f64c2657899f0b4f7a64e 1 parent d20d848
@ato authored
View
0  public/favicon.ico → resources/public/favicon.ico
File renamed without changes
View
0  public/images/header-bg.png → resources/public/images/header-bg.png
File renamed without changes
View
0  public/images/header.png → resources/public/images/header.png
File renamed without changes
View
0  public/js/html5.js → resources/public/js/html5.js
File renamed without changes
View
0  public/stylesheets/grid.css → resources/public/stylesheets/grid.css
File renamed without changes
View
0  public/stylesheets/reset.css → resources/public/stylesheets/reset.css
File renamed without changes
View
0  public/stylesheets/screen.css → resources/public/stylesheets/screen.css
File renamed without changes
View
6 src/clojars/web.clj
@@ -11,7 +11,8 @@
[clojars.web.common :only [html-doc]]
[clojars.web.login :only [login login-form]]
[hiccup.core :only [html h]]
- [ring.middleware.file :only [wrap-file]]
+ [ring.middleware.file-info :only [wrap-file-info]]
+ [ring.middleware.resource :only [wrap-resource]]
[ring.util.response :only [redirect status response]]
[compojure.core :only [defroutes GET POST ANY]]
[compojure.handler :only [site]]))
@@ -157,7 +158,8 @@
(def clojars-app
(site
(-> main-routes
- (wrap-file "public")
+ (wrap-resource "public")
+ (wrap-file-info)
db-middleware)))
(comment
Please sign in to comment.
Something went wrong with that request. Please try again.