mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-05-02 20:12:29 +00:00
Fix configuration template
This commit is contained in:
parent
0b09f03f49
commit
8b841176fa
@ -75,7 +75,8 @@ const setupDefaultUser = () => {
|
|||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
*/
|
*/
|
||||||
const setupDefaultSettings = () => {
|
const setupDefaultSettings = () => {
|
||||||
return Promise.all([settingModel
|
return Promise.all([
|
||||||
|
settingModel
|
||||||
.query()
|
.query()
|
||||||
.select(settingModel.raw('COUNT(`id`) as `count`'))
|
.select(settingModel.raw('COUNT(`id`) as `count`'))
|
||||||
.where({id: 'default-site'})
|
.where({id: 'default-site'})
|
||||||
@ -119,10 +120,11 @@ const setupDefaultSettings = () => {
|
|||||||
logger.info('Added oidc-config setting');
|
logger.info('Added oidc-config setting');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (debug_mode) {
|
if (config.debug()) {
|
||||||
logger.debug('Default setting setup not required');
|
logger.info('Default setting setup not required');
|
||||||
}
|
}
|
||||||
})]);
|
})
|
||||||
|
]);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,7 +1,19 @@
|
|||||||
<td>
|
<td>
|
||||||
<div><%- i18n('settings', 'default-site') %></div>
|
<div>
|
||||||
|
<% if (id === 'default-site') { %>
|
||||||
|
<%- i18n('settings', 'default-site') %>
|
||||||
|
<% } %>
|
||||||
|
<% if (id === 'oidc-config') { %>
|
||||||
|
<%- i18n('settings', 'oidc-config') %>
|
||||||
|
<% } %>
|
||||||
|
</div>
|
||||||
<div class="small text-muted">
|
<div class="small text-muted">
|
||||||
|
<% if (id === 'default-site') { %>
|
||||||
<%- i18n('settings', 'default-site-description') %>
|
<%- i18n('settings', 'default-site-description') %>
|
||||||
|
<% } %>
|
||||||
|
<% if (id === 'oidc-config') { %>
|
||||||
|
<%- i18n('settings', 'oidc-config-description') %>
|
||||||
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@ -12,10 +24,10 @@
|
|||||||
<% if (id === 'oidc-config' && meta && meta.name && meta.clientID && meta.clientSecret && meta.issuerURL && meta.redirectURL) { %>
|
<% if (id === 'oidc-config' && meta && meta.name && meta.clientID && meta.clientSecret && meta.issuerURL && meta.redirectURL) { %>
|
||||||
<%- meta.name %>
|
<%- meta.name %>
|
||||||
<% if (!meta.enabled) { %>
|
<% if (!meta.enabled) { %>
|
||||||
(Disabled)
|
(<%- i18n('str', 'disabled') %>)
|
||||||
<% } %>
|
<% } %>
|
||||||
<% } else if (id === 'oidc-config') { %>
|
<% } else if (id === 'oidc-config') { %>
|
||||||
Not configured
|
<%- i18n('settings', 'oidc-not-configured') %>
|
||||||
<% } %>
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="custom-controls-stacked">
|
<div class="custom-controls-stacked">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-label">Name <span class="form-required">*</span>
|
<label class="form-label"><%- i18n('str', 'name') %> <span class="form-required">*</span>
|
||||||
<input class="form-control name-input" name="meta[name]" required type="text" value="<%- meta && typeof meta.name !== 'undefined' ? meta.name : '' %>">
|
<input class="form-control name-input" name="meta[name]" required type="text" value="<%- meta && typeof meta.name !== 'undefined' ? meta.name : '' %>">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@ -40,7 +40,7 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-label">Enabled</div>
|
<div class="form-label"><%- i18n('str', 'enable') %></div>
|
||||||
<input class="form-check enabled-input" name="meta[enabled]" placeholder="" type="checkbox" <%- meta && (typeof meta.enabled !== 'undefined' && meta.enabled === true) || (JSON.stringify(meta) === '{}') ? 'checked="checked"' : '' %> >
|
<input class="form-check enabled-input" name="meta[enabled]" placeholder="" type="checkbox" <%- meta && (typeof meta.enabled !== 'undefined' && meta.enabled === true) || (JSON.stringify(meta) === '{}') ? 'checked="checked"' : '' %> >
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -293,6 +293,8 @@
|
|||||||
"default-site-html": "Custom Page",
|
"default-site-html": "Custom Page",
|
||||||
"default-site-redirect": "Redirect",
|
"default-site-redirect": "Redirect",
|
||||||
"oidc-config": "Open ID Conncect Configuration",
|
"oidc-config": "Open ID Conncect Configuration",
|
||||||
|
"oidc-config-description": "Sign in to Nginx Proxy Manager with an external Identity Provider",
|
||||||
|
"oidc-not-configured": "Not configured",
|
||||||
"oidc-config-hint-1": "Provide configuration for an IdP that supports Open ID Connect Discovery.",
|
"oidc-config-hint-1": "Provide configuration for an IdP that supports Open ID Connect Discovery.",
|
||||||
"oidc-config-hint-2": "The 'RedirectURL' must be set to '[base URL]/api/oidc/callback', the IdP must send the 'email' claim and a user with matching email address must exist in Nginx Proxy Manager."
|
"oidc-config-hint-2": "The 'RedirectURL' must be set to '[base URL]/api/oidc/callback', the IdP must send the 'email' claim and a user with matching email address must exist in Nginx Proxy Manager."
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user