mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-01 20:15:29 +02:00
feat(gitlab): add optional internal URL for GitLab integration
- Introduced a new field `gitlabInternalUrl` in the GitLab provider settings to allow users to specify an internal URL for OAuth token exchange when GitLab runs on the same instance as Dokploy. - Updated the GitLab provider forms to include the new field with appropriate descriptions. - Modified the token exchange logic to utilize the internal URL if provided, enhancing connectivity options for users.
This commit is contained in:
@@ -21,7 +21,9 @@ export const refreshGitlabToken = async (gitlabProviderId: string) => {
|
||||
return;
|
||||
}
|
||||
|
||||
const response = await fetch(`${gitlabProvider.gitlabUrl}/oauth/token`, {
|
||||
// Use internal URL for token refresh when GitLab is on same instance as Dokploy
|
||||
const baseUrl = gitlabProvider.gitlabInternalUrl || gitlabProvider.gitlabUrl;
|
||||
const response = await fetch(`${baseUrl}/oauth/token`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/x-www-form-urlencoded",
|
||||
|
||||
Reference in New Issue
Block a user