mirror of
https://github.com/knadh/listmonk.git
synced 2024-11-13 02:55:04 +08:00
Add non-prod ODIC URL warning on admin settings UI.
This commit is contained in:
parent
af06d2e462
commit
cc71899e86
2 changed files with 14 additions and 0 deletions
|
@ -35,6 +35,10 @@
|
|||
<b-field :label="$t('settings.security.OIDCRedirectURL')">
|
||||
<code><copy-text :text="`${serverConfig.root_url}/auth/oidc`" /></code>
|
||||
</b-field>
|
||||
<p v-if="!isURLOk" class="has-text-danger">
|
||||
<b-icon icon="warning-empty" />
|
||||
{{ $t('settings.security.OIDCRedirectWarning') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -93,6 +97,15 @@ export default Vue.extend({
|
|||
isMobile() {
|
||||
return this.windowWidth <= 768;
|
||||
},
|
||||
|
||||
isURLOk() {
|
||||
try {
|
||||
const u = new URL(this.serverConfig.root_url);
|
||||
return u.hostname !== 'localhost' && u.hostname !== '127.0.0.1';
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
|
|
@ -368,6 +368,7 @@
|
|||
"settings.security.OIDCClientID": "Client ID",
|
||||
"settings.security.OIDCClientSecret": "Client secret",
|
||||
"settings.security.OIDCRedirectURL": "Redirect URL for oAuth provider",
|
||||
"settings.security.OIDCRedirectWarning": "This does not seem to be a production URL. Change the Root URL in 'General' settings.",
|
||||
"settings.appearance.adminHelp": "Custom CSS to apply to the admin UI.",
|
||||
"settings.appearance.adminName": "Admin",
|
||||
"settings.appearance.customCSS": "Custom CSS",
|
||||
|
|
Loading…
Reference in a new issue