mirror of
https://github.com/woodchen-ink/aimodels-prices.git
synced 2025-07-18 13:41:59 +08:00
更新 OAuth 相关 URL 以使用新域名,并修改前端链接
This commit is contained in:
parent
40feab37f6
commit
d4aebb8148
@ -2,7 +2,7 @@ PORT=8080
|
||||
GIN_MODE=debug
|
||||
OAUTH_CLIENT_ID=your_client_id_here
|
||||
OAUTH_CLIENT_SECRET=your_client_secret_here
|
||||
OAUTH_REDIRECT_URI=https://aimodels-prices.q58.pro/api/auth/callback
|
||||
OAUTH_AUTHORIZE_URL=https://connect.q58.pro/oauth/authorize
|
||||
OAUTH_TOKEN_URL=https://connect.q58.pro/api/oauth/access_token
|
||||
OAUTH_USER_URL=https://connect.q58.pro/api/oauth/user
|
||||
OAUTH_REDIRECT_URI=https://aimodels-prices.q58.club/api/auth/callback
|
||||
OAUTH_AUTHORIZE_URL=https://connect.q58.club/oauth/authorize
|
||||
OAUTH_TOKEN_URL=https://connect.q58.club/api/oauth/access_token
|
||||
OAUTH_USER_URL=https://connect.q58.club/api/oauth/user
|
@ -91,7 +91,7 @@ func Login(c *gin.Context) {
|
||||
}
|
||||
|
||||
// 设置cookie
|
||||
c.SetCookie("session", sessionID, int(24*time.Hour.Seconds()), "/", "aimodels-prices.q58.pro", true, true)
|
||||
c.SetCookie("session", sessionID, int(24*time.Hour.Seconds()), "/", "aimodels-prices.q58.club", true, true)
|
||||
c.JSON(http.StatusOK, gin.H{"message": "Logged in successfully"})
|
||||
return
|
||||
}
|
||||
@ -125,7 +125,7 @@ func Logout(c *gin.Context) {
|
||||
db.Exec("DELETE FROM session WHERE id = ?", cookie)
|
||||
}
|
||||
|
||||
c.SetCookie("session", "", -1, "/", "aimodels-prices.q58.pro", true, true)
|
||||
c.SetCookie("session", "", -1, "/", "aimodels-prices.q58.club", true, true)
|
||||
c.JSON(http.StatusOK, gin.H{"message": "Logged out successfully"})
|
||||
}
|
||||
|
||||
@ -281,8 +281,8 @@ func AuthCallback(c *gin.Context) {
|
||||
}
|
||||
|
||||
// 设置 cookie
|
||||
c.SetCookie("session", sessionID, int(24*time.Hour.Seconds()), "/", "aimodels-prices.q58.pro", true, true)
|
||||
c.SetCookie("session", sessionID, int(24*time.Hour.Seconds()), "/", "aimodels-prices.q58.club", true, true)
|
||||
|
||||
// 重定向到前端
|
||||
c.Redirect(http.StatusTemporaryRedirect, "https://aimodels-prices.q58.pro")
|
||||
c.Redirect(http.StatusTemporaryRedirect, "https://aimodels-prices.q58.club")
|
||||
}
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
<el-footer height="60px">
|
||||
<div class="footer-content">
|
||||
<p>© 2025 Q58 AI模型价格 | <a href="https://q58.pro/t/topic/277?u=wood" target="_blank">介绍帖子</a></p>
|
||||
<p>© 2025 Q58 AI模型价格 | <a href="https://q58.club/t/topic/277?u=wood" target="_blank">介绍帖子</a></p>
|
||||
</div>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
|
@ -20,7 +20,7 @@
|
||||
</ul>
|
||||
|
||||
<h2>交流讨论</h2>
|
||||
<p>请在帖子下留言: <a href="https://q58.pro/t/topic/277?u=wood" target="_blank">https://q58.pro/t/topic/277</a></p>
|
||||
<p>请在帖子下留言: <a href="https://q58.club/t/topic/277?u=wood" target="_blank">https://q58.club/t/topic/277</a></p>
|
||||
|
||||
<h2>API文档</h2>
|
||||
<el-collapse>
|
||||
|
Loading…
x
Reference in New Issue
Block a user