Fix URL blocker when object storage enabled but type is disabled
This commit fixes two problems:
-
If the object type is disabled but object storage is enabled (as it is in Cloud Native GitLab), previously the URL blocker would attempt to drill into the endpoint. We now check that the type is also enabled.
-
Due to a Settingslogic bug (#286873 (closed)), the use of
default
anywhere causesHash#default
to be overriden for theSettingslogic
class. Ifconnection
fieldconnection.endpoint
is
omittted from object storage config, this previously would result in an error:
ArgumentError: wrong number of arguments (given 1, expected 0)>
We need to call to_h
because we define default
as a Gitaly storage name in GitLab Charts.
Relates to #357340 (closed)