mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
feat: allow optional HTTP protocol for self-hosted GitLab instances (#9757)
Co-authored-by: Rohit Malhotra <rohitvinodmalhotra@gmail.com>
This commit is contained in:
parent
4e5e2a7095
commit
402b6224a6
@ -56,8 +56,15 @@ class GitLabService(BaseGitService, GitService):
|
||||
self.token = token
|
||||
|
||||
if base_domain:
|
||||
self.BASE_URL = f'https://{base_domain}/api/v4'
|
||||
self.GRAPHQL_URL = f'https://{base_domain}/api/graphql'
|
||||
# Check if protocol is already included
|
||||
if base_domain.startswith(('http://', 'https://')):
|
||||
# Use the provided protocol
|
||||
self.BASE_URL = f'{base_domain}/api/v4'
|
||||
self.GRAPHQL_URL = f'{base_domain}/api/graphql'
|
||||
else:
|
||||
# Default to https if no protocol specified
|
||||
self.BASE_URL = f'https://{base_domain}/api/v4'
|
||||
self.GRAPHQL_URL = f'https://{base_domain}/api/graphql'
|
||||
|
||||
@property
|
||||
def provider(self) -> str:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user