Skip to content

Uploading a header logo when using Object Storage for Uploads results in erroneous URI

Summary

Uploading a header image in /admin/appearance while using object storage for uploads, upload will succeed but output templates return a URI constructed with the endpoint instead of the host.

Created from https://gitlab.com/charts/gitlab/issues/429

Steps to reproduce

  • Enable the use of object storage for uploads
  • Go to /admin/appearance
  • Upload an appropriate image
  • View any page where the header image will show

Example Project

https://gitlab.helm-charts.win/users/sign_in

What is the current bug behavior?

The uri for the logo is patterned as http://endpoint/bucket/appearance/logo.jpg?...

What is the expected correct behavior?

The uri for the logo is patterned as https://host/bucket/appearance/logo.jpg?...

Configuration example exhibiting behavior

uploads:
  enabled: true
    object_store:
      enabled: true
      remote_directory: gitlab-uploads
      direct_upload: true
      background_upload: false
      proxy_download: true
      connection:
        provider: AWS
        region: us-east-1
        aws_access_key_id: "<%= File.read('/etc/gitlab/minio/accesskey') %>"
        aws_secret_access_key: "<%= File.read('/etc/gitlab/minio/secretkey') %>"
        host: minio.helm-charts.win
        endpoint: http://production-minio-svc:9000
        path_style: true
Edited by Jason Plum