Fixed static file handling on phishing server + documentation. Fixes #164

pull/233/head
Jordan Wright 2016-03-23 14:11:47 -05:00
parent 9322d70fce
commit 49b0646454
3 changed files with 5 additions and 1 deletions

View File

@ -84,7 +84,7 @@ func CreateAdminRouter() http.Handler {
// CreatePhishingRouter creates the router that handles phishing connections.
func CreatePhishingRouter() http.Handler {
router := mux.NewRouter()
router.PathPrefix("/static").Handler(http.FileServer(http.Dir("./static/endpoint/")))
router.PathPrefix("/static/").Handler(http.StripPrefix("/static/", http.FileServer(http.Dir("./static/endpoint/"))))
router.HandleFunc("/track", PhishTracker)
router.HandleFunc("/{path:.*}", PhishHandler)
return router

4
static/endpoint/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

Binary file not shown.