chore: Remove DEPLOYMENT and SUBDOMAINS_ENABLED (#5742)

This commit is contained in:
Tom Moor
2023-08-28 20:39:58 -04:00
committed by GitHub
parent 7725f29dc7
commit 30a4303a8e
35 changed files with 136 additions and 135 deletions

View File

@@ -71,7 +71,7 @@ export async function signIn(
},
ip: ctx.request.ip,
});
const domain = getCookieDomain(ctx.request.hostname);
const domain = getCookieDomain(ctx.request.hostname, env.isCloudHosted);
const expires = addMonths(new Date(), 3);
// set a cookie for which service we last signed in with. This is
@@ -85,7 +85,7 @@ export async function signIn(
// set a transfer cookie for the access token itself and redirect
// to the teams subdomain if subdomains are enabled
if (env.SUBDOMAINS_ENABLED && team.subdomain) {
if (env.isCloudHosted && team.subdomain) {
// get any existing sessions (teams signed in) and add this team
const existing = getSessionsInCookie(ctx);
const sessions = encodeURIComponent(