engine: resources: Add a ui redirect
I always forget the /index.html part so make it easier!
This commit is contained in:
@@ -297,6 +297,10 @@ func (obj *HTTPUIRes) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||||||
}
|
}
|
||||||
router.SetHTMLTemplate(templ)
|
router.SetHTMLTemplate(templ)
|
||||||
|
|
||||||
|
router.GET(obj.routerPath("/"), func(c *gin.Context) {
|
||||||
|
c.Redirect(http.StatusMovedPermanently, obj.routerPath("/index.html"))
|
||||||
|
})
|
||||||
|
|
||||||
router.GET(obj.routerPath("/index.html"), func(c *gin.Context) {
|
router.GET(obj.routerPath("/index.html"), func(c *gin.Context) {
|
||||||
h := gin.H{}
|
h := gin.H{}
|
||||||
h["program"] = obj.init.Program
|
h["program"] = obj.init.Program
|
||||||
|
|||||||
Reference in New Issue
Block a user