mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 17:55:08 +01:00
Separate CLOUD_MODE and DISABLE_LOGIN.
This commit is contained in:
parent
3f1ed750f0
commit
02f031bde1
@ -65,10 +65,10 @@ const redirects = [
|
||||
},
|
||||
];
|
||||
|
||||
if (process.env.CLOUD_MODE) {
|
||||
if (process.env.CLOUD_MODE && process.env.DISABLE_LOGIN && process.env.CLOUD_URL) {
|
||||
redirects.push({
|
||||
source: '/login',
|
||||
destination: CLOUD_URL,
|
||||
destination: process.env.CLOUD_URL,
|
||||
permanent: false,
|
||||
});
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ export default function LoginPage({ disabled }) {
|
||||
export async function getServerSideProps() {
|
||||
return {
|
||||
props: {
|
||||
disabled: !!(process.env.DISABLE_LOGIN || process.env.CLOUD_MODE),
|
||||
disabled: !!process.env.DISABLE_LOGIN,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user