Reputation: 1331
I am trying to verify my DNS to get an SSL certificate using the file upload verification method:
I am using Nodejs express and did this:
router.get("/.well-known/pki-validation/6BFB7F1676F92A093F1BF1E6E425082F.txt",async function(req,res){
res.sendFile('./6BFB7F1676F92A093F1BF1E6E425082F.txt',{root: __dirname})
})
When i go the the url I can see the contents of the file. But when I click verify I get:
What am I doing wrong?
Upvotes: 1
Views: 867
Reputation: 1391
with expressjs try this code in index.js file to verify with "HTTP file upload" method:
...
app.get('/.well-known/pki-validation/2CBXXXXX_HTTP_FILE_UPLOAD_VERIFY_METHOD.txt', function (req, res, next) {
res.send('2CBXXXXX_HTTP_FILE_UPLOAD_VERIFY_METHOD content');
});
...
Upvotes: 2