weixincloud / wxcloudrun-wxcomponent Goto Github PK
View Code? Open in Web Editor NEW微信云托管 微信第三方平台模版
License: MIT License
微信云托管 微信第三方平台模版
License: MIT License
采用传统方式部署,正常启动,发现没法获取component_verify_ticket,在nginx日志发现回调返回401
[GIN] 2022/11/17 - 19:44:53 | 401 | 241.295µs | 81.69.103.236 | POST "/wxcallback/component?signature=f5b8b2998154f7b339238d207f87b6799dfc91c9×tamp=1668685492&nonce=619113215&encrypt_type=aes&msg_signature=956e41558746edb8da5cfe2075e7088d33653ca7"
然后在 middleware/wxsource.go 里发现有一个判断消息头是否包含 'x-wx-source'
// WXSourceMiddleWare 中间件 判断是否来源于微信
func WXSourceMiddleWare(c *gin.Context) {
if _, ok := c.Request.Header[http.CanonicalHeaderKey("x-wx-source")]; ok {
fmt.Println("[WXSourceMiddleWare]from wx")
c.Next()
} else {
// 加一条打印消息
fmt.Println("About", http.StatusUnauthorized, errno.ErrNotAuthorized)
c.Abort()
c.JSON(http.StatusUnauthorized, errno.ErrNotAuthorized)
}
}
在else里加一条打印消息,日志打印:
[GIN] 2022/11/17 - 19:54:53 | 401 | 265.135µs | 175.24.214.150 | POST "/wxcallback/component?signature=04d577389192b10dc0fbae16dd30167f7a405cd8×tamp=1668686093&nonce=806112033&encrypt_type=aes&msg_signature=10b4792cfdc0b5b1f831294d625ceb529518663a"
2022-11-17T19:54:53+08:00 | DEBUG | [middleware/log.go:23] ---header---
2022-11-17T19:54:53+08:00 | DEBUG | [middleware/log.go:25] X-Nginx-Proxy [true]
2022-11-17T19:54:53+08:00 | DEBUG | [middleware/log.go:25] Connection [upgrade]
2022-11-17T19:54:53+08:00 | DEBUG | [middleware/log.go:25] User-Agent [Mozilla/4.0]
2022-11-17T19:54:53+08:00 | DEBUG | [middleware/log.go:25] Accept [/]
2022-11-17T19:54:53+08:00 | DEBUG | [middleware/log.go:25] Pragma [no-cache]
2022-11-17T19:54:53+08:00 | DEBUG | [middleware/log.go:25] Content-Type [text/xml]
2022-11-17T19:54:53+08:00 | DEBUG | [middleware/log.go:25] Cache-Control [no-cache]
2022-11-17T19:54:53+08:00 | DEBUG | [middleware/log.go:25] X-Forwarded-For [81.69.103.236]
2022-11-17T19:54:53+08:00 | DEBUG | [middleware/log.go:25] Content-Length [571]
2022-11-17T19:54:53+08:00 | DEBUG | [middleware/log.go:25] X-Real-Ip [81.69.103.236]
2022-11-17T19:54:53+08:00 | DEBUG | [middleware/log.go:27] ---header---
Abort %s %s 401 &{1000 访问未授权 }
明显ticket推送消息头里没有 ‘x-wx-source’ 被拦截了?
更新到v2.2之后,获取列表的时候异步更新数据库更新全部数据会清空authorizers表的一些信息,比如nickname,funcInfo,而funcInfo字段关系到代开发小程序列表的查询
加油加油
这个项目很棒
PS D:\PROJECT\wxcloudrun-wxcomponent> go run main
package main is not in GOROOT (C:\Program Files\Go\src\main)
按照readme启动报错
部署完之后,访问授权链接生成器->PC 版授权链接->复制授权连接,访问时报如下错误:
WxErrCode != 0, resp: {41001 access_token missing rid: 637df9e4-4cd673ce-10c42658}
此软件支持部署在本地使用吗?
RUN cd /wxcloudrun-wxcomponent/client && npm install --registry=https://registry.npm.taobao.org && npm run build
复现步骤:
1.小程序首次扫码授权后生成authorizer_access_token
2.再次扫码授权(如:重新扫码修改权限集)
3.此时已存在的authorizer_access_token失效
invalid credential, access_token is invalid or not latest
重新授权后应刷新token
在腾讯云托管中,以zip包的形式上传部署完成了, 进入页面后需要输入管理员账号密码、但是并不知道初始管理员账号密码是多少,也没有地方可以查询,也没有地方可以重制。
提示文字说进入开放平台-站内信查看,但是我是自己上传ZIP包安装,站内信也没有相关信息。
下载了master分支的最新版本,发布失败了
go 语言很少人用,希望提供php版本
前端build报错:react router的版本设置过于宽松,升级后不兼容
解决方法:package.json里指定[email protected]
我发现数据推送的时候,查看源代码是json格式的,并不是官方的xml格式,在云上似乎有一个中间服务已经把加密数据解密然后再发给本服务的,这就导致我们直接没有办法本地运行,还要自己开发一个解密模块吗?!
我们自己的账号又没有办法使用云服务,总是得到这个错误:
绑定腾讯云账户失败:default -601051
您好,我打包下载代码后,将其复制到我的服务器中,并安装了golang,按照readme中将.env.example 重命名为.env,并填入了有效参数,但是运行命令go run main 后,光标卡在换行处,一直不动
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.