File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ const internalNginx = {
162
162
163
163
renderedLocations += await renderer . parseAndRender ( template , locationCopy ) ;
164
164
}
165
- }
165
+ } ;
166
166
167
167
locationRendering ( ) . then ( ( ) => resolve ( renderedLocations ) ) ;
168
168
} ) ;
@@ -211,6 +211,14 @@ const internalNginx = {
211
211
locationsPromise = internalNginx . renderLocations ( host ) . then ( ( renderedLocations ) => {
212
212
host . locations = renderedLocations ;
213
213
} ) ;
214
+
215
+ // Allow someone who is using / custom location path to use it, and skip the default / location
216
+ _ . map ( host . locations , ( location ) => {
217
+ if ( location . path === '/' ) {
218
+ host . use_default_location = false ;
219
+ }
220
+ } ) ;
221
+
214
222
} else {
215
223
locationsPromise = Promise . resolve ( ) ;
216
224
}
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ const internalProxyHost = {
25
25
}
26
26
27
27
return access . can ( 'proxy_hosts:create' , data )
28
- . then ( access_data => {
28
+ . then ( ( ) => {
29
29
// Get a list of the domain names and check each of them against existing records
30
30
let domain_name_check_promises = [ ] ;
31
31
@@ -52,7 +52,7 @@ const internalProxyHost = {
52
52
. omit ( omissions ( ) )
53
53
. insertAndFetch ( data ) ;
54
54
} )
55
- . then ( row => {
55
+ . then ( ( row ) => {
56
56
if ( create_certificate ) {
57
57
return internalCertificate . createQuickCertificate ( access , data )
58
58
. then ( cert => {
@@ -69,21 +69,21 @@ const internalProxyHost = {
69
69
return row ;
70
70
}
71
71
} )
72
- . then ( row => {
72
+ . then ( ( row ) => {
73
73
// re-fetch with cert
74
74
return internalProxyHost . get ( access , {
75
75
id : row . id ,
76
76
expand : [ 'certificate' , 'owner' , 'access_list' ]
77
77
} ) ;
78
78
} )
79
- . then ( row => {
79
+ . then ( ( row ) => {
80
80
// Configure nginx
81
81
return internalNginx . configure ( proxyHostModel , 'proxy_host' , row )
82
82
. then ( ( ) => {
83
83
return row ;
84
84
} ) ;
85
85
} )
86
- . then ( row => {
86
+ . then ( ( row ) => {
87
87
// Audit log
88
88
data . meta = _ . assign ( { } , data . meta || { } , row . meta ) ;
89
89
You can’t perform that action at this time.
0 commit comments