Serve ACME challenges

This commit is contained in:
cel
2017-07-24 20:43:50 -10:00
parent d9737b8da7
commit d12d51a61f
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -66,6 +66,7 @@ exports.init = function (sbot, config) {
var getMsg = memo({cache: lru(100)}, getMsgWithValue, sbot)
var getAbout = memo({cache: lru(100)}, require('./lib/about'), sbot)
var serveAcmeChallenge = require('ssb-acme-validator')(sbot)
http.createServer(serve).listen(port, host, function () {
console.log('[viewer] Listening on http://' + host + ':' + port)
@@ -80,6 +81,7 @@ exports.init = function (sbot, config) {
if (req.url.startsWith('/user-feed/')) return serveUserFeed(req, res, m[4])
else if (req.url.startsWith('/channel/')) return serveChannel(req, res, m[4])
else if (req.url.startsWith('/.well-known/acme-challenge')) return serveAcmeChallenge(req, res)
if (m[2] && m[2].length === 3) {
m[1] = decodeURIComponent(m[1])
+1
View File
@@ -14,6 +14,7 @@
"pull-cat": "^1.1.11",
"pull-paramap": "^1.2.1",
"pull-stream": "^3.5.0",
"ssb-acme-validator": "http://localhost:8989/blobs/get/&gB8wJuZROfFYWv+vxXaX4dBRG/U0W7eBNtFkkyN7A60=.sha256",
"ssb-client": "^4.4.0",
"ssb-marked": "^0.7.2",
"ssb-ref": "^2.6.2",