
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
disqus-proxy-server
Advanced tools
[](https://www.npmjs.org/package/disqus-proxy-server) 
首先,需要获取disqus提供的api-secret
。
在 Disqus 申请开启 api 权限。访问register new application 就可以注册一个 application.然后在applications可以看到你的 application 列表。其中 Secret Key 就是我们需要的api-secret,并且需要在后台的Settings => Community里开启访客评论
配置提供node
启动和docker
或者docker-compose
的方式启动,推荐docker
或者docker-compose
nodejs
需要Node.js
版本7.6
以上。
https://github.com/ciqulover/disqus-proxy-server
npm install
server
目录下的config.json
{
// 服务端端口,需要与disqus-proxy前端设置一致
"port": 5509,
// 你的diqus secret key
"api_secret": "your secret key",
// 你的website的 shortname 名称 比如在你的disqus安装代码中 有这样一句脚本:
// s.src = 'https://test-eo9kkdlcze.disqus.com/embed.js';
// 那么你的disqus 的shortname 就是 test-eo9kkdlcze
"shortname": "shortname",
// 日志路径,可以填写绝对路径,默认当前目录下自动创建log目录
log_path: null
只有使用nginx反向代理node时,为true,只监听否则本地端口127.0.0.1,默认false,监听0.0.0.0
proxy: false
}
测试启动:
node server.js
正式使用时需要用pm2
启动,来守护服务端进程
npm install pm2 -g
pm2 start server.js
-- 到此结束,检测评论是否正常显示 --
如果需要https访问,我们可以用nginx来反向代理disqus proxy.
其中disqus-proxy.domain.com是你的反向代理的域名,配置好证书位置。其中5509端口是在config.json里配置的端口
server {
listen 443 ssl;
server_name disqus-proxy.domain.com;
ssl_certificate /etc/ssl/disqus-proxy.domain.com.crt;
ssl_certificate_key /etc/ssl/disqus-proxy.domain.com.key;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:5509$request_uri;
}
}
FAQs
[](https://www.npmjs.org/package/disqus-proxy-server) 
We found that disqus-proxy-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.