Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
Use the backend address as the webhook callback address
天舟5104396aa4d9
diff --git a/frontend/src/main.ts b/frontend/src/main.tsindex b164b79434..611945fae2 100644--- a/frontend/src/main.ts+++ b/frontend/src/main.ts@@ -39,7 +39,7 @@ import {isDev,isDemo,isRelease,- backend,+ backendURL,humanizeTs,sizeToFit,urlfy,@@ -80,7 +80,7 @@ registerStoreWithRoleUtil(store);console.debug("dev:", isDev());console.debug("demo:", isDemo());console.debug("release:", isRelease());-console.debug("backend:", backend());+console.debug("backend:", backendURL());axios.defaults.timeout = 3000;axios.interceptors.request.use((request) => {diff --git a/frontend/src/store/modules/gitlab.ts b/frontend/src/store/modules/gitlab.tsindex 5386cb4c2e..f1712f4461 100644--- a/frontend/src/store/modules/gitlab.ts+++ b/frontend/src/store/modules/gitlab.ts@@ -7,6 +7,7 @@ import {OAuthToken,WebhookInfo,} from "../../types";+import { backendURL } from "../../utils";const GITLAB_API_PATH = "api/v4";const GITLAB_WEBHOOK_PATH = "hook/gitlab";@@ -94,7 +95,7 @@ const actions = {accessToken: string;}): Promise<WebhookInfo> {- const url = `${vcs.instanceURL}/${GITLAB_WEBHOOK_PATH}/${uuidv4()}`;+ const url = `${backendURL()}/${GITLAB_WEBHOOK_PATH}/${uuidv4()}`;const data = (await axios.post(`${vcs.instanceURL}/${GITLAB_API_PATH}/projects/${projectId}/hooks`,diff --git a/frontend/src/utils/util.ts b/frontend/src/utils/util.tsindex fb9005a8e9..c56e98b073 100644--- a/frontend/src/utils/util.ts+++ b/frontend/src/utils/util.ts@@ -12,7 +12,7 @@ export function isRelease(): boolean {return import.meta.env.PROD && !isDemo();}-export function backend(): string {+export function backendURL(): string {return import.meta.env.VITE_BACKEND as string;}