diff options
author | Sean McGivern <sean@gitlab.com> | 2019-09-05 19:41:46 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2019-09-05 19:41:46 +0300 |
commit | 0e335ec90e7a03e8a6fd3df939de0c647f8a4360 (patch) | |
tree | 7a5720b87f61ec337446d828e8785343a8b6a10a /spec | |
parent | a76643ad2472d2765c24983ce37b301315d930f8 (diff) | |
parent | 921c704f0084739fb0e20e94f8572b6e1841175c (diff) |
Merge branch '67037-user-content-gitlab-static-net-brings-back-404-only' into 'master'
Resolve "user-content.gitlab-static.net brings back 404 only"
See merge request gitlab-org/gitlab-ce!32703
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/banzai/filter/asset_proxy_filter_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/lib/banzai/filter/asset_proxy_filter_spec.rb b/spec/lib/banzai/filter/asset_proxy_filter_spec.rb index b7f45421b2a..0c4ccbf28f4 100644 --- a/spec/lib/banzai/filter/asset_proxy_filter_spec.rb +++ b/spec/lib/banzai/filter/asset_proxy_filter_spec.rb @@ -36,6 +36,17 @@ describe Banzai::Filter::AssetProxyFilter do expect(Gitlab.config.asset_proxy.whitelist).to eq %w(gitlab.com *.mydomain.com) expect(Gitlab.config.asset_proxy.domain_regexp).to eq /^(gitlab\.com|.*?\.mydomain\.com)$/i end + + context 'when whitelist is empty' do + it 'defaults to the install domain' do + stub_application_setting(asset_proxy_enabled: true) + stub_application_setting(asset_proxy_whitelist: []) + + described_class.initialize_settings + + expect(Gitlab.config.asset_proxy.whitelist).to eq [Gitlab.config.gitlab.host] + end + end end context 'when properly configured' do |