This commit is contained in:
1 parent
21abd01593
commit
2483dd933a
5 files changed
+30
-15
No files matched your search
@@ -1855,7 +1855,8 @@ func (h *Handler) WecomCheckinAuth(c *gin.Context) {
|
||||
}
|
||||
redirectURI := strings.TrimSpace(q.RedirectURI)
|
||||
if redirectURI == "" {
|
||||
// 兜底:按请求 Host 还原落地页地址(反代透传 X-Forwarded-Proto)。
|
||||
// 兜底:按请求 Host 还原落地页地址(独立手机端 H5 路由,反代透传
|
||||
// X-Forwarded-Proto)。
|
||||
scheme := "https"
|
||||
if c.Request.TLS == nil {
|
||||
if proto := strings.TrimSpace(c.GetHeader("X-Forwarded-Proto")); proto != "" {
|
||||
@@ -1864,7 +1865,7 @@ func (h *Handler) WecomCheckinAuth(c *gin.Context) {
|
||||
scheme = "http"
|
||||
}
|
||||
}
|
||||
redirectURI = fmt.Sprintf("%s://%s/platform/training/checkin/%s", scheme, c.Request.Host, q.Token)
|
||||
redirectURI = fmt.Sprintf("%s://%s/m/training/checkin/%s", scheme, c.Request.Host, q.Token)
|
||||
}
|
||||
url, err := h.svc.WecomCheckinAuthURL(c.Request.Context(), q.Token, redirectURI)
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user