diff --git a/app/controllers/hotlinks_controller.rb b/app/controllers/hotlinks_controller.rb new file mode 100644 index 000000000..3fae6f54c --- /dev/null +++ b/app/controllers/hotlinks_controller.rb @@ -0,0 +1,7 @@ +class HotlinksController < ApplicationController + + def log_referrer + raise "Image being hotlinked from: #{request.referrer}" + end + +end \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 249eea6e0..454584954 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -7,6 +7,10 @@ Diaspora::Application.routes.draw do mount RailsAdmin::Engine => '/admin_panel', :as => 'rails_admin' end + # Some INDIVIDUAL is hotlinking to files that don't exist + get "/landing" => 'hotlinks#log_referrer' + get "/landing/*path" => 'hotlinks#log_referrer' + get 'oembed' => 'posts#oembed', :as => 'oembed' # Posting and Reading resources :reshares