Attempt to fix Flipper-UI (#9320) [deploy]

* Upgrade redis-store, attempt to fix flipper ui

* Remove explicit Gemfile require for redis-store, use URL.url

* Re-add use of URL 🤦
This commit is contained in:
Josh Puetz 2020-07-15 22:13:40 -05:00 committed by GitHub
parent 3b73038919
commit 9ce75250ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 3 deletions

View file

@ -655,7 +655,7 @@ GEM
redis-actionpack (>= 5.0, < 6)
redis-activesupport (>= 5.0, < 6)
redis-store (>= 1.2, < 2)
redis-store (1.8.1)
redis-store (1.9.0)
redis (>= 4, < 5)
regexp_parser (1.7.1)
request_store (1.5.0)

View file

@ -23,7 +23,7 @@ Rails.application.routes.draw do
Sidekiq::Web.set :session_secret, Rails.application.secrets[:secret_key_base]
Sidekiq::Web.set :sessions, Rails.application.config.session_options
Sidekiq::Web.class_eval do
use Rack::Protection, origin_whitelist: ["https://dev.to"] # resolve Rack Protection HttpOrigin
use Rack::Protection, origin_whitelist: [URL.url] # resolve Rack Protection HttpOrigin
end
mount Sidekiq::Web => "/sidekiq"
mount FieldTest::Engine, at: "abtests"
@ -43,7 +43,14 @@ Rails.application.routes.draw do
authenticate :user, ->(user) { user.has_role?(:tech_admin) } do
mount Blazer::Engine, at: "blazer"
mount Flipper::UI.app(Flipper, { rack_protection: {} }), at: "feature_flags"
flipper_ui = Flipper::UI.app(Flipper) do |builder|
builder.use Rack::Protection, origin_whitelist: [URL.url]
# Requires redis-store > 1.9: https://github.com/redis-store/redis-store/pull/333
builder.use Rack::Session::Cookie,
secret: Rails.application.secrets[:secret_key_base]
end
mount flipper_ui, at: "feature_flags"
end
resources :articles, only: %i[index show update]

Binary file not shown.

BIN
vendor/cache/redis-store-1.9.0.gem vendored Normal file

Binary file not shown.