()
| 16 | } |
| 17 | |
| 18 | func (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来。 |
nothing calls this directly
no outgoing calls
no test coverage detected