Ocean/StaticFiles/Map2Root.go
Thorsten Sommer f33f7b5c29 Refactoring, Bugfix & Updates
+ Refactored all imports
+ Fixed a bug for the logging regarding removing \n \t \r
+ Updated to current MGO release
+ Changed the name of ICCC
2014-10-19 19:19:11 +02:00

22 lines
478 B
Go

package StaticFiles
import (
"github.com/SommerEngineering/Ocean/Shutdown"
"net/http"
)
func HandlerMapStaticFiles2Root(response http.ResponseWriter, request *http.Request) {
if Shutdown.IsDown() {
http.NotFound(response, request)
return
}
if request.RequestURI == `/` {
request.RequestURI = `/staticFiles/` + startFile4Map2Root
} else {
request.RequestURI = `/staticFiles` + request.RequestURI
}
HandlerStaticFiles(response, request)
}