Skip to content

Commit

Permalink
fix(ssl): ensure well-known block actually gets created
Browse files Browse the repository at this point in the history
no issue
- fixes ssl setup issue
  • Loading branch information
acburdine committed Jul 11, 2017
1 parent ebd4bce commit 08597c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion extensions/nginx/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,10 @@ class NginxExtension extends cli.Extension {
ctx.ssl.conf = conf;
ctx.ssl.http = conf.nginx.server;

let location = ctx.ssl.http.location;

// Don't add well-known block if it already exists
if (ctx.ssl.http.location.length === 1) {
if (!Array.isArray(location) || location.length === 1) {
ctx.ssl.http._add('location', '~ /.well-known');
ctx.ssl.http.location[1]._add('allow', 'all');
}
Expand Down

0 comments on commit 08597c9

Please sign in to comment.