raise on hotlinking [ci skip]
This commit is contained in:
parent
bdf7dba42e
commit
08fddf7422
2 changed files with 11 additions and 0 deletions
7
app/controllers/hotlinks_controller.rb
Normal file
7
app/controllers/hotlinks_controller.rb
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
class HotlinksController < ApplicationController
|
||||
|
||||
def log_referrer
|
||||
raise "Image being hotlinked from: #{request.referrer}"
|
||||
end
|
||||
|
||||
end
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue