Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Add type assertion for GitLab selfhosted URL

Tuan Dang0f003e8ab6aa
diff --git a/frontend/src/pages/integrations/gitlab/authorize.tsx b/frontend/src/pages/integrations/gitlab/authorize.tsx
index ca79f676a9..32cf97869b 100644
--- a/frontend/src/pages/integrations/gitlab/authorize.tsx
+++ b/frontend/src/pages/integrations/gitlab/authorize.tsx
@@ -40,12 +40,12 @@ export default function GitLabAuthorizeIntegrationPage() {
if (!integrationOption) return;
- const baseURL = gitLabURL.trim() === "" ? "https://gitlab.com" : gitLabURL.trim();
+ const baseURL = (gitLabURL as string).trim() === "" ? "https://gitlab.com" : (gitLabURL as string).trim();
const csrfToken = crypto.randomBytes(16).toString("hex");
localStorage.setItem("latestCSRFToken", csrfToken);
- const state = `${csrfToken}|${gitLabURL.trim() === "" ? "" : gitLabURL.trim()}`;
+ const state = `${csrfToken}|${(gitLabURL as string).trim() === "" ? "" : (gitLabURL as string).trim()}`;
const link = `${baseURL}/oauth/authorize?client_id=${integrationOption.clientId}&redirect_uri=${window.location.origin}/integrations/gitlab/oauth2/callback&response_type=code&state=${state}`;
window.location.assign(link);