修复图片上传分类无法新增、潜在movementWindow容差问题、404页面未生效问题
This commit is contained in:
@@ -47,3 +47,20 @@ func (s *Server) placeHiddenPage(w http.ResponseWriter) {
|
||||
s.pausePage(w, http.StatusForbidden, "🔒", "这个地点没有对访客开放",
|
||||
"站长按区域设置隐藏了这个地点的记录。带你去别处看看。", 4)
|
||||
}
|
||||
|
||||
// notFoundPage 是「这个地址没有东西」时的回应。
|
||||
//
|
||||
// 状态码仍是 404(脚本和搜索引擎照旧当成不存在),但给人看的是站点样式的提示页 ——
|
||||
// Go 默认那句纯文本 `404 page not found` 摆在白底上像是站点坏了。这个站其它「不给你看」
|
||||
// 的场景(内容未开放、地点被区域隐藏)早就都走 pausePage 了,只有「压根没有」这类漏在外头。
|
||||
//
|
||||
// 与 placeHiddenPage 的区别要保持:那个是 403「存在但不给看」,这个是 404「就没有」。
|
||||
func (s *Server) notFoundPage(w http.ResponseWriter, title, msg string) {
|
||||
if title == "" {
|
||||
title = "这个页面不存在"
|
||||
}
|
||||
if msg == "" {
|
||||
msg = "地址可能写错了,或者这条记录已经被删掉。带你去别处看看。"
|
||||
}
|
||||
s.pausePage(w, http.StatusNotFound, "🧭", title, msg, 4)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user