Skip to content

Commit

Permalink
fix #7914 and #8115 -- issues with lang_temp=en, user impersonation, …
Browse files Browse the repository at this point in the history
…dev mode
  • Loading branch information
williamstein committed Jan 17, 2025
1 parent 17567e4 commit e3e4969
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/packages/server/auth/impersonate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { getServerSettings } from "@cocalc/database/settings/server-settings";
import clientSideRedirect from "@cocalc/server/auth/client-side-redirect";
import { createRememberMeCookie } from "@cocalc/server/auth/remember-me";
import { isLocale } from "@cocalc/util/i18n/const";
import { join } from "path";

export async function signInUsingImpersonateToken({ req, res }) {
try {
Expand Down Expand Up @@ -42,7 +43,7 @@ async function doIt({ req, res }) {
});

const { dns } = await getServerSettings();
let target = `https://${dns}${base_path}app`;
let target = `https://${dns}${join(base_path, "app")}`;

// if lang_temp is a locale, then append it as a query parameter.
// This is usally "en" to help admins understanding the UI without changing the user's language preferences.
Expand Down

0 comments on commit e3e4969

Please sign in to comment.