add log to debug cookie
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
package utils
|
package utils
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"log"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/yauthdev/yauth/server/constants"
|
"github.com/yauthdev/yauth/server/constants"
|
||||||
)
|
)
|
||||||
@@ -13,6 +15,8 @@ func SetCookie(gc *gin.Context, token string) {
|
|||||||
secure = false
|
secure = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Println("-> is cookie secure", secure)
|
||||||
|
|
||||||
gc.SetCookie(constants.COOKIE_NAME, token, 3600, "/", GetFrontendHost(), secure, httpOnly)
|
gc.SetCookie(constants.COOKIE_NAME, token, 3600, "/", GetFrontendHost(), secure, httpOnly)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
package utils
|
package utils
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"log"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|
||||||
"github.com/yauthdev/yauth/server/constants"
|
"github.com/yauthdev/yauth/server/constants"
|
||||||
@@ -12,5 +13,7 @@ func GetFrontendHost() string {
|
|||||||
return `localhost`
|
return `localhost`
|
||||||
}
|
}
|
||||||
|
|
||||||
return u.Hostname()
|
log.Println("hostname", "."+u.Hostname())
|
||||||
|
|
||||||
|
return "." + u.Hostname()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user