updates to static server

This commit is contained in:
AJ ONeal 2015-12-12 07:18:06 +00:00
parent d50f2507cf
commit f818b79c7a
5 changed files with 7 additions and 1 deletions

View File

View File

@ -0,0 +1 @@
hello

View File

@ -1,7 +1,10 @@
'use strict';
var path = require('path');
module.exports = {
server: "https://acme-staging.api.letsencrypt.org/directory"
, tlsSni01Port: 5001
, http01Port: 80
, webrootPath: path.join(__dirname, "acme-challenge")
};

View File

@ -37,7 +37,7 @@ app.use('/', function (req, res, next) {
// handle static requests to /.well-known/acme-challenge
app.use(
'/.well-known/acme-challenge'
, express.static(path.join(__dirname, 'acme-challenge'), { dotfiles: undefined })
, express.static(config.webrootPath, { dotfiles: undefined })
);

2
tests/test.bash Normal file
View File

@ -0,0 +1,2 @@
curl http://localhost:80/.well-known/acme-challenge/hello
curl https://localhost.daplie.com:5001/.well-known/acme-challenge/hello