Browse Source

updates to static server

node-letsencrypt-python
AJ ONeal 9 years ago
parent
commit
f818b79c7a
  1. 0
      tests/acme-challenge/.gitkeep
  2. 1
      tests/acme-challenge/hello
  3. 3
      tests/config.js
  4. 2
      tests/serve-acme-challenges.js
  5. 2
      tests/test.bash

0
tests/acme-challenge/.gitkeep

1
tests/acme-challenge/hello

@ -0,0 +1 @@
hello

3
tests/config.js

@ -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")
};

2
tests/serve-acme-challenges.js

@ -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

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