mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 04:31:41 +00:00
no registrar referers #84
This commit is contained in:
parent
2ae58f4313
commit
8f38f2fe5f
1 changed files with 8 additions and 0 deletions
8
db/migrate/20200801230101_change_referer_to_origin.rb
Normal file
8
db/migrate/20200801230101_change_referer_to_origin.rb
Normal file
|
@ -0,0 +1,8 @@
|
|||
class ChangeRefererToOrigin < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
rename_column :access_logs, :http_referer, :http_origin
|
||||
|
||||
# Eliminar todos los referers anteriores manteniendo el origin
|
||||
ActiveRecord::Base.connection.execute("update access_logs set http_origin = split_part(http_origin, '/', 1) || '//' || split_part(http_origin, '/', 2) where http_origin is not null")
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue