Skip to content

Commit

Permalink
fix: disable Rack Attack when ENABLE_RACK_ATTACK=0 (#37) (#38)
Browse files Browse the repository at this point in the history
* fix: disable Rack Attack when ENABLE_RACK_ATTACK=0

* update chromedirver version to 117.0.5938.132
  • Loading branch information
moustachu authored Oct 4, 2023
1 parent bf8a998 commit 9645fd2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
# TODO: Use latest version
- uses: nanasess/setup-chromedriver@v2
with:
chromedriver-version: "114.0.5735.90"
chromedriver-version: "117.0.5938.132"
- run: bundle exec rake "test:run[exclude, spec/system/**/*_spec.rb, ${{ matrix.slice }}]"
name: RSpec
- run: ./.github/upload_coverage.sh decidim-app $GITHUB_EVENT_PATH
Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:
# TODO: Use latest version
- uses: nanasess/setup-chromedriver@v2
with:
chromedriver-version: "114.0.5735.90"
chromedriver-version: "117.0.5938.132"
- run: bundle exec rake "test:run[include, spec/system/**/*_spec.rb, ${{ matrix.slice }}]"
name: RSpec
- run: ./.github/upload_coverage.sh decidim-app $GITHUB_EVENT_PATH
Expand Down
6 changes: 5 additions & 1 deletion config/initializers/rack_attack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@

# Enabled by default in production
# Can be deactivated with 'ENABLE_RACK_ATTACK=0'
DecidimApp::RackAttack.apply_configuration if DecidimApp::RackAttack.rack_enabled?
if DecidimApp::RackAttack.rack_enabled?
DecidimApp::RackAttack.apply_configuration
else
Rack::Attack.enabled = false
end

0 comments on commit 9645fd2

Please sign in to comment.