mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-28 14:08:43 +02:00
These chagnes standardize how session loading is done for session cookie, auth bearer token, and query params. - Bearer token previously combined with session cookie. - rearranged cookie-store to put exported methods above unexported - added header store that implements session loader interface - added query param store that implements session loader interface Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
12 lines
286 B
Go
12 lines
286 B
Go
package sessions // import "github.com/pomerium/pomerium/internal/sessions"
|
|
|
|
import "strings"
|
|
|
|
// ParentSubdomain returns the parent subdomain.
|
|
func ParentSubdomain(s string) string {
|
|
if strings.Count(s, ".") < 2 {
|
|
return ""
|
|
}
|
|
split := strings.SplitN(s, ".", 2)
|
|
return split[1]
|
|
}
|