mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 10:41:03 +01:00
Remove unused context.Domain
it was added (and wrong idx) on previous commit for some of my internal tests, this is not used anywhere so remove it.
This commit is contained in:
parent
66a66fdfa0
commit
49c1a595ec
|
@ -297,15 +297,6 @@ func (ctx *Context) PostFormMulti(name string) []string {
|
||||||
return arrStr
|
return arrStr
|
||||||
}
|
}
|
||||||
|
|
||||||
// Domain same as VirtualHostname but without the :port part (if any)
|
|
||||||
func (ctx *Context) Domain() string {
|
|
||||||
domain := ctx.VirtualHostname()
|
|
||||||
if idx := strings.IndexByte(domain, ':'); idx > 0 {
|
|
||||||
domain = domain[0 : idx-1]
|
|
||||||
}
|
|
||||||
return domain
|
|
||||||
}
|
|
||||||
|
|
||||||
// Subdomain returns the subdomain (string) of this request, if any
|
// Subdomain returns the subdomain (string) of this request, if any
|
||||||
func (ctx *Context) Subdomain() (subdomain string) {
|
func (ctx *Context) Subdomain() (subdomain string) {
|
||||||
host := ctx.HostString()
|
host := ctx.HostString()
|
||||||
|
|
|
@ -23,7 +23,6 @@ type (
|
||||||
URLParams() map[string]string
|
URLParams() map[string]string
|
||||||
MethodString() string
|
MethodString() string
|
||||||
HostString() string
|
HostString() string
|
||||||
Domain() string
|
|
||||||
Subdomain() string
|
Subdomain() string
|
||||||
PathString() string
|
PathString() string
|
||||||
RequestPath(bool) string
|
RequestPath(bool) string
|
||||||
|
|
|
@ -94,7 +94,7 @@ func (m *Manager) Start(ctx context.IContext) store.IStore {
|
||||||
cookie.SetValue(base64.URLEncoding.EncodeToString([]byte(sid)))
|
cookie.SetValue(base64.URLEncoding.EncodeToString([]byte(sid)))
|
||||||
cookie.SetPath("/")
|
cookie.SetPath("/")
|
||||||
if !m.config.DisableSubdomainPersistance {
|
if !m.config.DisableSubdomainPersistance {
|
||||||
requestDomain := ctx.HostString() // we don't use the ctx.Domain because it gives the virtual domain, which is correct on some cases but not here.
|
requestDomain := ctx.HostString()
|
||||||
|
|
||||||
if portIdx := strings.IndexByte(requestDomain, ':'); portIdx > 0 {
|
if portIdx := strings.IndexByte(requestDomain, ':'); portIdx > 0 {
|
||||||
requestDomain = requestDomain[0:portIdx]
|
requestDomain = requestDomain[0:portIdx]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user