Mixed Content:

In many places of my local GitLab I have this error that for example, it doesn’t let me check the correctness of the yaml CI/CD file:

Mixed Content: The page at 'https://example.com/assets/webpack/yaml.fe43b05f.worker.js' was loaded over HTTPS, but requested an insecure resource 'http://example.com/assets/webpack/ci.69184461.json'. This request has been blocked; the content must be served over HTTPS.

I tried to modify the file “/opt/gitlab/embedded/service/gitlab-rails/app/views/layouts/_head.html.haml” adding the first answer of this post but it’s still not working.

I’m using a Traefik to force the https redirection and my gitlab.rd is:

    external_url 'http://example.com'
    pages_external_url 'http://example.com'
    
    nginx['custom_error_pages'] = {
      '502' => {
        'title' => 'Server Loading',
        'header' => 'Server Loading',
        'message' => 'Wait a few minutes please!'
      }
    }


    gitlab_rails['smtp_enable'] = true
    gitlab_rails['smtp_address'] = '...'
    gitlab_rails['smtp_port'] = '...'
    gitlab_rails['smtp_user_name'] = '...'
    gitlab_rails['smtp_password'] = '...'
    gitlab_rails['smtp_domain'] = '...'
    gitlab_rails['smtp_authentication'] = '...'
    gitlab_rails['smtp_enable_starttls_auto'] = '...'
    gitlab_rails['smtp_tls'] = false
    gitlab_rails['smtp_pool'] = false
    gitlab_rails['backup_keep_time'] = 604800

    gitlab_rails['backup_upload_connection'] = {
      'provider' => 'AWS',
      'region' => 'eu-west-1',
      'aws_access_key_id' => '...',
      'aws_secret_access_key' => '...',
       ...
    }
    gitlab_rails['backup_upload_remote_directory'] = 'gitlab-backup-stlc'
    gitlab_rails['backup_multipart_chunk_size'] = 104857600
    gitlab_rails['backup_storage_class'] = 'STANDARD'
    
    gitlab_rails['auto_migrate'] = false
    postgresql['auto_restart_on_version_change'] = false
    geo_postgresql['auto_restart_on_version_change'] = false

    postgresql['enable'] = false
    gitlab_rails['db_adapter'] = "postgresql"
    gitlab_rails['db_database'] = '...'
    gitlab_rails['db_username'] = '...'
    gitlab_rails['db_password'] = '...'
    gitlab_rails['db_host'] = '...'
    gitlab_rails['db_port'] = '...'

    gitlab_rails['redis_host'] = "gitlab-redis"
    gitlab_rails['redis_port'] = 6379

    puma['worker_processes'] = 0

    sidekiq['max_concurrency'] = 10

    prometheus_monitoring['enable'] = false

    gitlab_rails['env'] = {
      'MALLOC_CONF' => 'dirty_decay_ms:1000,muzzy_decay_ms:1000'
    }

Thanks!