Skip to content

Commit 08597c9

Browse files
committed
fix(ssl): ensure well-known block actually gets created
no issue - fixes ssl setup issue
1 parent ebd4bce commit 08597c9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

extensions/nginx/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,10 @@ class NginxExtension extends cli.Extension {
158158
ctx.ssl.conf = conf;
159159
ctx.ssl.http = conf.nginx.server;
160160

161+
let location = ctx.ssl.http.location;
162+
161163
// Don't add well-known block if it already exists
162-
if (ctx.ssl.http.location.length === 1) {
164+
if (!Array.isArray(location) || location.length === 1) {
163165
ctx.ssl.http._add('location', '~ /.well-known');
164166
ctx.ssl.http.location[1]._add('allow', 'all');
165167
}

0 commit comments

Comments
 (0)