Skip to content
Extraits de code Groupes Projets
Valider 08fddf74 rédigé par danielgrippi's avatar danielgrippi
Parcourir les fichiers

raise on hotlinking [ci skip]

parent bdf7dba4
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
class HotlinksController < ApplicationController
def log_referrer
raise "Image being hotlinked from: #{request.referrer}"
end
end
\ No newline at end of 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
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter