MCPcopy Create free account
hub / github.com/TruthHun/BookStack / Prepare

Method Prepare

controllers/LocalhostController.go:18–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16}
17
18func (c *LocalhostController) Prepare() {
19 c.NoNeedLoginRouter = true
20 prefix := "localhost"
21 port := beego.AppConfig.String("httpport")
22 if port != "80" {
23 prefix = prefix + ":" + port
24 }
25 if !strings.HasPrefix(c.Ctx.Request.Host, prefix) {
26 c.Abort("404")
27 return
28 }
29}
30
31//渲染markdown.
32//根据文档id来。

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected