File upload issue - after upgrade to GitLab 15.4.1

Hi,

Using GitLab Community in our organisation. Have been using version 14.10.2 for several months without any particular issue.

Last Thursday I have upgraded our instance to the latest version 15.4.1, by following the recommended documentation in full. All seems to have went well, but I have discovered an issue: getting an HTTP 500 when uploading any file into a project. I have attached a screenshot of the failing operation and some logs shown when running gitlab-ctl tail.

Instance details: on-prem VM: Ubuntu 20.04 LTS with latest updates.
GitLab 15.1.4 (upgraded from 14.10.2 → 15.0.5 → 15.1.4)
Server health and resources look fine. No other processes using this server apart GitLab.

==> /var/log/gitlab/nginx/gitlab_access.log <==
3.74.126.81 - - [03/Oct/2022:10:35:58 +0200] "POST /api/v4/jobs/request HTTP/1.1" 204 0 "" "gitlab-runner 15.3.0 (15-3-stable; go1.17.9; linux/amd64)" -

==> /var/log/gitlab/gitlab-rails/production.log <==
[ActionDispatch::HostAuthorization::DefaultResponseApp] Blocked host: localhost

==> /var/log/gitlab/gitlab-workhorse/current <==
{"correlation_id":"01GEEFSNC6FJ41CT74JHKPBC0S","error":"handleFileUploads: extract files from multipart: no api response: status 403","level":"error","method":"POST","msg":"","time":"2022-10-03T10:35:58+02:00","uri":"/xx/xx/-/create/script-xx.com"}
{"content_type":"text/html; charset=utf-8","correlation_id":"01GEEFSNC6FJ41CT74JHKPBC0S","duration_ms":2,"host":"gitlab.xx.com","level":"info","method":"POST","msg":"access","proto":"HTTP/1.1","referrer":"https://gitlab.xx.com/xx/xx/-/tree/script-xx.com","remote_addr":"127.0.0.1:0","remote_ip":"127.0.0.1","route":"","status":500,"system":"http","time":"2022-10-03T10:35:58+02:00","ttfb_ms":2,"uri":"/xx/xx/-/create/script-xx.com","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36","written_bytes":3049}

==> /var/log/gitlab/nginx/gitlab_access.log <==
10.5.31.5 - - [03/Oct/2022:10:35:58 +0200] "POST /xx/xx/-/create/script-xx.com HTTP/1.1" 500 3049 "https://gitlab.xx.com/xx/xx/-/tree/script-xx.com" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36" -

==> /var/log/gitlab/gitlab-rails/production.log <==
[ActionDispatch::HostAuthorization::DefaultResponseApp] Blocked host: localhost
^CTraceback (most recent call last):
        5: from /opt/gitlab/embedded/bin/omnibus-ctl:23:in `<main>'
        4: from /opt/gitlab/embedded/bin/omnibus-ctl:23:in `load'
        3: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/bin/omnibus-ctl:31:in `<top (required)>'
        2: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:746:in `run'
        1: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:584:in `tail'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:584:in `system': Interrupt

Usage operation:

Do you still have this issue?

This issue was fixed.

I had previously configured the host domain name in config file:
/etc/gitlab.rbgitlab_rails['allowed_hosts'] = ['gitlab.domain.com']

I reverted this to the default configuration by commenting out this line, and this issue was resolved.

If its behind reverse proxy it seems we need to add localhost or similar.