raise on hotlinking [ci skip]

This commit is contained in:
danielgrippi 2012-05-16 14:41:01 -07:00
parent bdf7dba42e
commit 08fddf7422
2 changed files with 11 additions and 0 deletions

View file

@ -0,0 +1,7 @@
class HotlinksController < ApplicationController
def log_referrer
raise "Image being hotlinked from: #{request.referrer}"
end
end

View file

@ -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