Sha256: 87a1261dbc98cc7bd889ce8ef9922ee25c75f7360a7c074e2ad99bd06a1e2a8b

Contents?: true

Size: 715 Bytes

Versions: 7

Compression:

Stored size: 715 Bytes

Contents

RailsApp::Application.routes.draw do
  get 'dummy/index' => 'dummy#index'
  get 'dummy/blocked_by_inline' => 'dummy#blocked_by_inline', :constraints => FirewallConstraint.new
  
  constraints FirewallConstraint.new do
    get 'dummy/blocked_by_block' => 'dummy#blocked_by_block'
  end
  
  constraints FirewallConstraint.new(['127.0.0.1']) do
    get 'dummy/blocked_by_dynamic' => 'dummy#blocked_by_dynamic'
  end
  
  constraints FirewallConstraint.new([]) do
    root :to => 'dummy#index'
  end
  
  constraints FirewallConstraint.new('fe80::d69a:20ff:fe0d:45fe') do
    get 'dummy/blocked_by_ipv6'
  end

  constraints FirewallConstraint.new(Proc.new{['127.0.0.1']}) do
    get 'dummy/blocked_by_proc'
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
firewall_constraint-0.1.3 spec/rails_app/config/routes.rb
firewall_constraint-0.1.2 spec/rails_app/config/routes.rb
firewall_constraint-0.1.1 spec/rails_app/config/routes.rb
firewall_constraint-0.1.0 spec/rails_app/config/routes.rb
firewall_constraint-0.0.9 spec/rails_app/config/routes.rb
firewall_constraint-0.0.8 spec/rails_app/config/routes.rb
firewall_constraint-0.0.7 spec/rails_app/config/routes.rb