Skip to content

Instantly share code, notes, and snippets.

@tasdikrahman
Created July 9, 2020 13:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tasdikrahman/36a2223cdafbe5ed5582c439ec575697 to your computer and use it in GitHub Desktop.
Save tasdikrahman/36a2223cdafbe5ed5582c439ec575697 to your computer and use it in GitHub Desktop.
class ApplicationController < ActionController::Base
protect_from_forgery with: exception
def append_info_to_payload(payload)
super
payload[:host] = request.host
payload[:remote_ip] = request.remote_ip
payload[:ip] = request.ip
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment