diff --git a/cmd/go-scrobble/main.go b/cmd/go-scrobble/main.go index 252ce049..f88e131f 100644 --- a/cmd/go-scrobble/main.go +++ b/cmd/go-scrobble/main.go @@ -8,8 +8,8 @@ import ( "strings" "time" - "git.m2.nz/go-scrobble/internal/goscrobble" "github.com/joho/godotenv" + "gitlab.com/idanoo/go-scrobble/internal/goscrobble" ) func main() { diff --git a/docs/config.md b/docs/config.md index 02c7d2c3..00672e1b 100644 --- a/docs/config.md +++ b/docs/config.md @@ -16,6 +16,8 @@ These are stored in `web/.env.production` and `web/.env.development` REDIS_PREFIX="gs:" // Redis key prefix REDIS_AUTH="" // Redis password + TIMEZONE= // Used for MySQL connection + JWT_SECRET= // 32+ Char JWT secret JWT_EXPIRY=86400 // JWT expiry diff --git a/go.mod b/go.mod index 79216131..0effb27f 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module git.m2.nz/go-scrobble +module gitlab.com/idanoo/go-scrobble go 1.16 diff --git a/internal/goscrobble/utils.go b/internal/goscrobble/utils.go index 0078368f..b24ddb3e 100644 --- a/internal/goscrobble/utils.go +++ b/internal/goscrobble/utils.go @@ -45,10 +45,11 @@ func getUserIp(r *http.Request) net.IP { var ip net.IP host, _, _ := net.SplitHostPort(r.RemoteAddr) if contains(ReverseProxies, host) { - forwardedFor := r.Header.Get("X-FOWARDED-FOR") + forwardedFor := r.Header.Get("X-Forwarded-For") if forwardedFor != "" { host = forwardedFor } + // realIp := r.Header.Get("X-Real-IP") } ip = net.ParseIP(host) diff --git a/web/src/Components/Pages/Home.js b/web/src/Components/Pages/Home.js index 08274b01..0556345a 100644 --- a/web/src/Components/Pages/Home.js +++ b/web/src/Components/Pages/Home.js @@ -10,11 +10,11 @@ function Home() {

- git.m2.nz/idanoo/go-scrobble + gitlab.com/idanoo/go-scrobble );