index.jsView |
---|
65 | 65 … | } |
66 | 66 … | |
67 | 67 … | var getMsg = memo({cache: lru(100)}, getMsgWithValue, sbot) |
68 | 68 … | var getAbout = memo({cache: lru(100)}, require('./lib/about'), sbot) |
| 69 … | + var serveAcmeChallenge = require('ssb-acme-validator')(sbot) |
69 | 70 … | |
70 | 71 … | http.createServer(serve).listen(port, host, function () { |
71 | 72 … | console.log('[viewer] Listening on http://' + host + ':' + port) |
72 | 73 … | }) |
|
79 | 80 … | var m = urlIdRegex.exec(req.url) |
80 | 81 … | |
81 | 82 … | if (req.url.startsWith('/user-feed/')) return serveUserFeed(req, res, m[4]) |
82 | 83 … | else if (req.url.startsWith('/channel/')) return serveChannel(req, res, m[4]) |
| 84 … | + else if (req.url.startsWith('/.well-known/acme-challenge')) return serveAcmeChallenge(req, res) |
83 | 85 … | |
84 | 86 … | if (m[2] && m[2].length === 3) { |
85 | 87 … | m[1] = decodeURIComponent(m[1]) |
86 | 88 … | m[2] = m[1][0] |