Support registry http.relativeurls in harbor.yml

Signed-off-by: Taha Farahani <tahacodes@proton.me>
This commit is contained in:
Taha Farahani 2024-04-23 12:30:15 +03:30
parent b7d4bf0d07
commit c6656c21c2
No known key found for this signature in database
GPG Key ID: 6A6245E2D0837AF5
3 changed files with 13 additions and 0 deletions

View File

@ -41,6 +41,10 @@ https:
# And when it enabled the hostname will no longer used
# external_url: https://reg.mydomain.com:8433
# Uncomment relativeurls if you want to return relative URLs in Location headers
# And when it enabled the client is responsible for resolving the correct URL
# relativeurls: true
# The initial password of Harbor admin
# It only works in first time to install harbor
# Remember Change the admin password from UI after launching Harbor.

View File

@ -45,6 +45,9 @@ redis:
maxactive: 500
idletimeout: 60s
http:
{% if relativeurls %}
relativeurls: true
{% else %}
{% if internal_tls.enabled %}
addr: :5443
tls:

View File

@ -144,6 +144,12 @@ def parse_yaml_config(config_file_path, with_trivy):
else:
config_dict['public_url'] = '{protocol}://{hostname}:{http_port}'.format(**config_dict)
# relativeurls config
if configs.get('relativeurls'):
config_dict['relativeurls'] = configs.get('relativeurls')
else:
config_dict['relativeurls'] = False
# DB configs
db_configs = configs.get('database')
if db_configs: