Separate CLOUD_MODE and DISABLE_LOGIN.

This commit is contained in:
Mike Cao 2023-04-25 14:48:50 -07:00
parent 3f1ed750f0
commit 02f031bde1
2 changed files with 3 additions and 3 deletions

View File

@ -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,
});
}

View File

@ -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,
},
};
}