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