Skip to content

Instantly share code, notes, and snippets.

@omrilotan
Last active April 5, 2020 18:31
Show Gist options
  • Save omrilotan/2e40c2d0e02ffd71af992f1d3447323f to your computer and use it in GitHub Desktop.
Save omrilotan/2e40c2d0e02ffd71af992f1d3447323f to your computer and use it in GitHub Desktop.
const request_metadata = {
user_agent: request.get('user-agent'),
ip: request.get('true-client-ip'), // provided by DNS service
country: request.get('cf-ipcountry'), // Cloudflare provides GeoIP for free!
is_known_crawler: isbot(request.get('user-agent')),
referrer: request.get('referer'),
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment