Comments (3)
全局查找并编辑文件bizwechat.js文件
在第6行的下一行加入以下2行内容,也就是const { pushBearRouter, indexHtml } = require('./pushbear')
下面
const https = require('https')
const fs = require('fs')
在第24行的下一行加入以下4行内容,也就是const app = express()
下面
const privateKey = fs.readFileSync('/root/.node-red/cert.key')
const certificate = fs.readFileSync('/root/.node-red/cert.pem')
const options = {key: privateKey, cert: certificate}
const httpsServer = https.createServer(options, app)
将下面的内容替换
const server = app.listen(biz_config.port, () => {
node.status({ text:
port: ${biz_config.port}, fill: 'green', shape: 'dot' })
node.log(
listening on port ${biz_config.port})
})
为如下:
if (biz_config.url.startsWith("https")){
const server = httpsServer.listen(biz_config.port, () => {
node.status({ text:
port: ${biz_config.port}, fill: 'green', shape: 'dot' })
node.log(
https listening on port ${biz_config.port})
})
}`
else{
const server = app.listen(biz_config.port, () => {
node.status({ text:
port: ${biz_config.port}, fill: 'green', shape: 'dot' })
node.log(
listening on port ${biz_config.port})
})}
@FlashSoft 是否考虑在下个版本中加入https支持?
from node-red-contrib-bizwechat.
nginx反代即可,没必要程序支持
from node-red-contrib-bizwechat.
全局查找并编辑文件bizwechat.js文件
在第6行的下一行加入以下2行内容,也就是const { pushBearRouter, indexHtml } = require('./pushbear')
下面
const https = require('https')
const fs = require('fs')
在第24行的下一行加入以下4行内容,也就是
const app = express()
下面
const privateKey = fs.readFileSync('/root/.node-red/cert.key')
const certificate = fs.readFileSync('/root/.node-red/cert.pem')
const options = {key: privateKey, cert: certificate}
const httpsServer = https.createServer(options, app)
将下面的内容替换
const server = app.listen(biz_config.port, () => {
node.status({ text:
port: ${biz_config.port}, fill: 'green', shape: 'dot' })
node.log(
listening on port ${biz_config.port})
})
为如下:
if (biz_config.url.startsWith("https")){
const server = httpsServer.listen(biz_config.port, () => {
node.status({ text:
port: ${biz_config.port}, fill: 'green', shape: 'dot' })
node.log(
https listening on port ${biz_config.port})
})
}`
else{
const server = app.listen(biz_config.port, () => {
node.status({ text:
port: ${biz_config.port}, fill: 'green', shape: 'dot' })
node.log(
listening on port ${biz_config.port})
})}
@FlashSoft 是否考虑在下个版本中加入https支持?
清楚明白,成功使用SSL,非常感谢!
也谢谢yaming116开发出这么好用的插件!
from node-red-contrib-bizwechat.
Related Issues (20)
- 推送的消息中,有部分图片无法加载 HOT 1
- 有无开发计划加入根据post得到的信息推送 HOT 4
- 启动命令? HOT 5
- 这个项目有没有qq群,一起交流
- “手摸手从零开始教程”大佬是程序媛嘛?可以摸手的那种~
- 能否加入详细页面自由设置,比如3Dtouch按通知时,能弹出里面的具体内容? HOT 1
- [端口错误]-Cannot GET /pushbear/2019-11/xxx HOT 2
- 弱弱的问下,这东西PHP怎么调用啊?
- 为什么提示3秒超时应答呢? HOT 2
- 想请教一下您,是否可以在消息推送中 取到上一个节点的 msg.payload 值呢? HOT 1
- 能增加图文消息功能吗? HOT 1
- 获取access_token报错 HOT 1
- Error: [微信Token]:Error: Parse Error: Expected HTTP/ HOT 1
- node-red-contrib-bizwechat配置好后无法访问 HOT 1
- 群晖vmm安装的nodered使用不正常,但是群晖docker安装的nodered缺能正常工作 HOT 1
- Error: [微信推送]访问ip不在白名单之中 HOT 2
- 是否可以支持调用微信的域名可以自定义 HOT 1
- 服务的回调,一直超时重复发送消息
- 回调一直错误
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-red-contrib-bizwechat.