mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-20 23:07:33 +00:00
fa9f581d56
* chore: move to new org * logging * fix: org rename caos -> zitadel Co-authored-by: adlerhurst <silvan.reusser@gmail.com>
23 lines
473 B
Go
23 lines
473 B
Go
package domain
|
|
|
|
import (
|
|
"net"
|
|
net_http "net/http"
|
|
|
|
http_util "github.com/zitadel/zitadel/internal/api/http"
|
|
)
|
|
|
|
type BrowserInfo struct {
|
|
UserAgent string
|
|
AcceptLanguage string
|
|
RemoteIP net.IP
|
|
}
|
|
|
|
func BrowserInfoFromRequest(r *net_http.Request) *BrowserInfo {
|
|
return &BrowserInfo{
|
|
UserAgent: r.Header.Get(http_util.UserAgentHeader),
|
|
AcceptLanguage: r.Header.Get(http_util.AcceptLanguage),
|
|
RemoteIP: http_util.RemoteIPFromRequest(r),
|
|
}
|
|
}
|