2
由於某種原因,某種腳本會每秒或更快地向我的站點發出重複請求,導致不存在的URL。這很痛苦,因爲它堵塞了日誌(並且是一種不必要(儘管很小)的資源消耗)。想知道在Heroku上託管的網站是否有處理這個問題的好方法。這些請求每次都來自不同的IP地址。Heroku阻止請求到URL
編輯:作爲一個說明,請求總是到完全相同的URL。
下面是一個例子,其中重複每一秒左右,除了從不同IP:
Feb 22 08:37:28 myApp app/web.1: ActionController::RoutingError (Not Found):
Feb 22 08:37:28 myApp app/web.1: app/controllers/application_controller.rb:31:in `not_found'
Feb 22 08:37:28 myApp app/web.1: app/controllers/my_controller.rb:141:in `my_method'
Feb 22 08:37:28 myApp app/web.1: [Exceptiontrap] Raised Exceptiontrap::Rack::Exception
Feb 22 08:37:28 myApp app/web.1: [Exceptiontrap] Catched Exception: ActionController::RoutingError
Feb 22 08:37:28 myApp app/web.1: Started GET "/aSpecificURL" for 109.242.56.44 at 2014-02-22 13:37:28 +0000
Feb 22 08:37:28 myApp heroku/router: at=info method=GET path=/aSpecificURL host=www.myApp.com request_id=9caeabcf-adcc-417f-940d-0458a81d9c32 fwd="109.242.56.44" dyno=web.1 connect=2ms service=24ms status=404 bytes=1632