Skip to content

Commit

Permalink
Added option to disable login. Closes umami-software#948
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecao committed Feb 16, 2022
1 parent 429d5b4 commit 8e350a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = {
env: {
VERSION: pkg.version,
FORCE_SSL: !!process.env.FORCE_SSL,
DISABLE_LOGIN: !!process.env.DISABLE_LOGIN,
},
basePath: process.env.BASE_PATH,
eslint: {
Expand Down
4 changes: 4 additions & 0 deletions pages/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import Layout from 'components/layout/Layout';
import LoginForm from 'components/forms/LoginForm';

export default function LoginPage() {
if (process.env.DISABLE_LOGIN) {
return null;
}

return (
<Layout title="login" header={false} footer={false} center>
<LoginForm />
Expand Down

0 comments on commit 8e350a2

Please sign in to comment.