Rails 4 InvalidCrossOriginRequest错误

时间:2018-08-03 20:37:33

标签: ruby-on-rails ruby apache security

今天开始获得这些错误的负载:

F, [2018-08-03T18:02:08.783602 #22987] FATAL -- :
ActionController::InvalidCrossOriginRequest (Security warning: an embedded <script> tag on another site requested protected JavaScript. If you know what you're doing, go ahead and disable forgery protection on this action to permit cross-
origin JavaScript embedding.):
  actionpack (4.2.5) lib/action_controller/metal/request_forgery_protection.rb:225:in `verify_same_origin_request'
  activesupport (4.2.5) lib/active_support/callbacks.rb:432:in `block in make_lambda'
  activesupport (4.2.5) lib/active_support/callbacks.rb:239:in `block in halting'
  activesupport (4.2.5) lib/active_support/callbacks.rb:506:in `block in call'
  activesupport (4.2.5) lib/active_support/callbacks.rb:506:in `each'
  activesupport (4.2.5) lib/active_support/callbacks.rb:506:in `call'
  activesupport (4.2.5) lib/active_support/callbacks.rb:92:in `__run_callbacks__'
  activesupport (4.2.5) lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
  activesupport (4.2.5) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (4.2.5) lib/abstract_controller/callbacks.rb:19:in `process_action'
  actionpack (4.2.5) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (4.2.5) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
  activesupport (4.2.5) lib/active_support/notifications.rb:164:in `block in instrument'
  activesupport (4.2.5) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.2.5) lib/active_support/notifications.rb:164:in `instrument'
....

我以前从未见过。今天,我的应用程序中唯一发生变化的地方是:我在通用路由后面设置了一个控制器,以捕获由于大量的me脚脚本小子探测我的站点而不断在产品日志中弹出的路由错误,这实在令人讨厌,我现在只是不会在路由错误后阻止每个IP。

我对此不太在意,但有时一些非常特定的白痴试图抓取我的网站来窃取我的东西,因此我主要担心的是他们提出了一些新的建议,这也意味着我略微低估了大小他们的大脑。

现在我遇到了这个错误,但是我不知道谁试图从Web服务器日志中加载与之无关的内容。我怎么知道发生了什么事?

0 个答案:

没有答案