Skip to content

Commit fb66625

Browse files
committed
Moved block into an initializer
1 parent e04316c commit fb66625

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

config/environments/production.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,4 @@
8787
# Use default logging formatter so that PID and timestamp are not suppressed.
8888
config.log_formatter = ::Logger::Formatter.new
8989

90-
config.middleware.use Rack::Block do
91-
path '/posts/fut11com-busca-desarrollador*' do
92-
halt 302
93-
end
94-
end
9590
end

config/initializers/block.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Rails.application.config.middleware.use Rack::Block do
2+
bot_access do
3+
path '/posts/fut11com-busca-desarrollador*' do
4+
halt 302
5+
end
6+
end
7+
end

0 commit comments

Comments
 (0)