Skip to content

Commit

Permalink
raise on hotlinking [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgrippi committed May 16, 2012
1 parent bdf7dba commit 08fddf7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/controllers/hotlinks_controller.rb
@@ -0,0 +1,7 @@
class HotlinksController < ApplicationController

def log_referrer
raise "Image being hotlinked from: #{request.referrer}"
end

end
4 changes: 4 additions & 0 deletions config/routes.rb
Expand Up @@ -7,6 +7,10 @@
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
Expand Down

0 comments on commit 08fddf7

Please sign in to comment.