Commit 36d8489e authored by ibuler's avatar ibuler

[Update] 修改static路径

parent 5def5cd6
<html> <html>
<body style="margin: 0"> <body style="margin: 0">
<script type="text/javascript" src="/static/js/jquery-2.1.1.js"></script> <script type="text/javascript" src="/coco/static/js/jquery-2.1.1.js"></script>
<script type="text/javascript" src="/static/js/jquery-ui-1.10.4.min.js"></script> <script type="text/javascript" src="/coco/static/js/jquery-ui-1.10.4.min.js"></script>
<script type="text/javascript" src="/static/js/neffos.min.js"></script> <script type="text/javascript" src="/coco/static/js/neffos.min.js"></script>
<script type="text/javascript" src="/static/plugins/elfinder/elfinder.full.js"></script> <script type="text/javascript" src="/coco/static/plugins/elfinder/elfinder.full.js"></script>
<script type="text/javascript" src="/static/plugins/elfinder/i18n/elfinder.pl.js"></script> <script type="text/javascript" src="/coco/static/plugins/elfinder/i18n/elfinder.pl.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="/static/plugins/elfinder/css/elfinder.min.css"> <link rel="stylesheet" type="text/css" media="screen" href="/coco/static/plugins/elfinder/css/elfinder.min.css">
<link rel="stylesheet" type="text/css" media="screen" href="/static/plugins/elfinder/css/theme-gray.css"> <link rel="stylesheet" type="text/css" media="screen" href="/coco/static/plugins/elfinder/css/theme-gray.css">
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
var scheme = document.location.protocol == "https:" ? "wss" : "ws"; var scheme = document.location.protocol == "https:" ? "wss" : "ws";
var port = document.location.port ? ":" + document.location.port : ""; var port = document.location.port ? ":" + document.location.port : "";
......
...@@ -51,7 +51,7 @@ func StartHTTPServer() { ...@@ -51,7 +51,7 @@ func StartHTTPServer() {
router := mux.NewRouter() router := mux.NewRouter()
fs := http.FileServer(http.Dir(filepath.Join(conf.RootPath, "static"))) fs := http.FileServer(http.Dir(filepath.Join(conf.RootPath, "static")))
router.PathPrefix("/static/").Handler(http.StripPrefix("/static/", fs)) router.PathPrefix("/coco/static/").Handler(http.StripPrefix("/static/", fs))
router.Handle("/socket.io/", sshWs) router.Handle("/socket.io/", sshWs)
router.HandleFunc("/coco/elfinder/sftp/{host}/", AuthDecorator(sftpHostFinder)) router.HandleFunc("/coco/elfinder/sftp/{host}/", AuthDecorator(sftpHostFinder))
...@@ -68,5 +68,3 @@ func StartHTTPServer() { ...@@ -68,5 +68,3 @@ func StartHTTPServer() {
func StopHTTPServer() { func StopHTTPServer() {
_ = httpServer.Close() _ = httpServer.Close()
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment