mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-25 14:26:58 +00:00
split
This commit is contained in:
parent
162ac30f5c
commit
66c56dcf82
5 changed files with 283 additions and 200 deletions
|
@ -3,6 +3,8 @@ package context
|
|||
import (
|
||||
stdContext "context"
|
||||
"net/http"
|
||||
|
||||
"codeberg.org/codeberg/pages/server/utils"
|
||||
)
|
||||
|
||||
type Context struct {
|
||||
|
@ -56,3 +58,7 @@ func (c *Context) Path() string {
|
|||
func (c *Context) Host() string {
|
||||
return c.Req.URL.Host
|
||||
}
|
||||
|
||||
func (c *Context) TrimHostPort() string {
|
||||
return utils.TrimHostPort(c.Req.Host)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue