summaryrefslogtreecommitdiff
path: root/src/rhimportd/ctrlWeb.go
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-04-02 16:10:36 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-04-02 16:10:36 (GMT)
commit8933910f9846bac630bf0dab06a4b7cd6b2b5ce3 (patch)
treeb5babbb14840c9fcac437c1122fd7d8071d9367e /src/rhimportd/ctrlWeb.go
parent24420034428f6bafc41b34e9b8a6316b4f2aa65e (diff)
added http static dir for static files
Diffstat (limited to 'src/rhimportd/ctrlWeb.go')
-rw-r--r--src/rhimportd/ctrlWeb.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rhimportd/ctrlWeb.go b/src/rhimportd/ctrlWeb.go
index 6bee325..2b52ef0 100644
--- a/src/rhimportd/ctrlWeb.go
+++ b/src/rhimportd/ctrlWeb.go
@@ -44,9 +44,10 @@ func (self webHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
self.H(self.Config, self.DBChan, self.SessionStoreChan, self.trusted, w, r)
}
-func StartControlWeb(addr string, uploadMaxAge time.Duration, conf *rhimport.Config, db *rddb.DBChan, sessions *rhimport.SessionStoreChan) {
- // http.Handle("/trusted/simple", webHandler{conf, db, sessions, true, webSimpleHandler})
+func StartControlWeb(addr, staticDir string, uploadMaxAge time.Duration, conf *rhimport.Config, db *rddb.DBChan, sessions *rhimport.SessionStoreChan) {
+ http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir(staticDir))))
+ // http.Handle("/trusted/simple", webHandler{conf, db, sessions, true, webSimpleHandler})
http.Handle("/public/simple", webHandler{conf, db, sessions, false, webSimpleHandler})
http.Handle("/public/socket", webHandler{conf, db, sessions, false, webSocketHandler})
http.Handle("/public/upload", webHandler{conf, db, sessions, false, webUploadHandler})