5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-07-03 05:56:08 +00:00

no registrar referers #84

This commit is contained in:
f 2020-08-01 20:13:09 -03:00
parent 2ae58f4313
commit 8f38f2fe5f

View 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