migrate from envars to toml config
This commit is contained in:
parent
5284b8a7cc
commit
04f7f97b62
12 changed files with 182 additions and 109 deletions
|
@ -154,10 +154,6 @@ func LoginHandler() http.Handler {
|
|||
return
|
||||
}
|
||||
|
||||
fmt.Println(discord.CLIENT_ID)
|
||||
fmt.Println(discord.API_ENDPOINT)
|
||||
fmt.Println(discord.REDIRECT_URI)
|
||||
|
||||
code := r.URL.Query().Get("code")
|
||||
|
||||
if code == "" {
|
||||
|
@ -194,7 +190,7 @@ func LoginHandler() http.Handler {
|
|||
cookie.Name = "token"
|
||||
cookie.Value = session.Token
|
||||
cookie.Expires = time.Now().Add(24 * time.Hour)
|
||||
if strings.HasPrefix(global.HTTP_DOMAIN, "https") {
|
||||
if strings.HasPrefix(global.Config.BaseUrl, "https") {
|
||||
cookie.Secure = true
|
||||
}
|
||||
cookie.HttpOnly = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue