diff options
author | Brett Walker <bwalker@gitlab.com> | 2019-02-21 02:51:55 +0300 |
---|---|---|
committer | Brett Walker <bwalker@gitlab.com> | 2019-08-15 20:42:08 +0300 |
commit | 228608c2a226d777b32c129369f6b0b4329b31cf (patch) | |
tree | b8f2e0c8d62528e645e9983bd3a78cd68fd4e7bd /config | |
parent | 6ccbccc2010dc1197d7b721c76cdb176050e43d8 (diff) |
Add support for using a Camo proxy server
User images and videos will get proxied through
the Camo server in order to keep malicious
sites from collecting the IP address of users.
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/asset_proxy_settings.rb | 6 | ||||
-rw-r--r-- | config/initializers/fill_shards.rb | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/config/initializers/asset_proxy_settings.rb b/config/initializers/asset_proxy_settings.rb new file mode 100644 index 00000000000..92247aba1b8 --- /dev/null +++ b/config/initializers/asset_proxy_settings.rb @@ -0,0 +1,6 @@ +# +# Asset proxy settings +# +ActiveSupport.on_load(:active_record) do + Banzai::Filter::AssetProxyFilter.initialize_settings +end diff --git a/config/initializers/fill_shards.rb b/config/initializers/fill_shards.rb index 18e067c8854..cad662e12f3 100644 --- a/config/initializers/fill_shards.rb +++ b/config/initializers/fill_shards.rb @@ -1,3 +1,5 @@ -if Shard.connected? && !Gitlab::Database.read_only? +# The `table_exists?` check is needed because during our migration rollback testing, +# `Shard.connected?` could be cached and return true even though the table doesn't exist +if Shard.connected? && Shard.table_exists? && !Gitlab::Database.read_only? Shard.populate! end |