Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7330997281 | ||
|
|
0787522d7c | ||
|
|
46df72ac0e | ||
|
|
6839c15a7b | ||
|
|
d50dc90a54 | ||
|
|
4039efe4b2 | ||
|
|
2ab1ea44ff |
No files matched your search
@@ -60,6 +60,7 @@
|
|||||||
}
|
}
|
||||||
body > a h1 {
|
body > a h1 {
|
||||||
margin-top: .2em;
|
margin-top: .2em;
|
||||||
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
// Version is the current File Manager version.
|
// Version is the current File Manager version.
|
||||||
Version = "1.4.5"
|
Version = "1.4.6"
|
||||||
|
|
||||||
ListViewMode = "list"
|
ListViewMode = "list"
|
||||||
MosaicViewMode = "mosaic"
|
MosaicViewMode = "mosaic"
|
||||||
|
|||||||
+1
-4
@@ -38,10 +38,7 @@ func reCaptcha(secret string, response string) (bool, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var data struct {
|
var data struct {
|
||||||
Success bool `json:"success"`
|
Success bool `json:"success"`
|
||||||
ChallengeTS time.Time `json:"challenge_ts"`
|
|
||||||
Hostname string `json:"hostname"`
|
|
||||||
ErrorCodes interface{} `json:"error-codes"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
err = json.NewDecoder(resp.Body).Decode(&data)
|
err = json.NewDecoder(resp.Body).Decode(&data)
|
||||||
|
|||||||
+7
-8
@@ -86,7 +86,7 @@ func serve(c *fm.Context, w http.ResponseWriter, r *http.Request) (int, error) {
|
|||||||
|
|
||||||
// Any other request should show the index.html file.
|
// Any other request should show the index.html file.
|
||||||
w.Header().Set("x-frame-options", "SAMEORIGIN")
|
w.Header().Set("x-frame-options", "SAMEORIGIN")
|
||||||
w.Header().Set("x-content-type", "nosniff")
|
w.Header().Set("x-content-type-options", "nosniff")
|
||||||
w.Header().Set("x-xss-protection", "1; mode=block")
|
w.Header().Set("x-xss-protection", "1; mode=block")
|
||||||
|
|
||||||
return renderFile(c, w, "index.html")
|
return renderFile(c, w, "index.html")
|
||||||
@@ -223,13 +223,12 @@ func renderFile(c *fm.Context, w http.ResponseWriter, file string) (int, error)
|
|||||||
w.Header().Set("Content-Type", contentType+"; charset=utf-8")
|
w.Header().Set("Content-Type", contentType+"; charset=utf-8")
|
||||||
|
|
||||||
data := map[string]interface{}{
|
data := map[string]interface{}{
|
||||||
"BaseURL": c.RootURL(),
|
"BaseURL": c.RootURL(),
|
||||||
"NoAuth": c.NoAuth,
|
"NoAuth": c.NoAuth,
|
||||||
"Version": fm.Version,
|
"Version": fm.Version,
|
||||||
"CSS": template.CSS(c.CSS),
|
"CSS": template.CSS(c.CSS),
|
||||||
"ReCaptcha": c.ReCaptchaKey != "" && c.ReCaptchaSecret != "",
|
"ReCaptcha": c.ReCaptchaKey != "" && c.ReCaptchaSecret != "",
|
||||||
"ReCaptchaKey": c.ReCaptchaKey,
|
"ReCaptchaKey": c.ReCaptchaKey,
|
||||||
"ReCaptchaSecret": c.ReCaptchaSecret,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.StaticGen != nil {
|
if c.StaticGen != nil {
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
0333464bb0a238393150731bc833fa4aa3b7ec60
|
e48e71dd340a2bf3434e06c86032565365132976
|
||||||
Reference in new issue
Block a user