摘要:
/** * SnowFlake ID Generator * Based on Twitter Snowflake to generate unique ID across multiple * datacenters and databases without having duplicates. * * * SnowFlake Layout * * 1 sign ... 阅读全文
摘要:
--获取客户端ip function get_client_ip() local headers=ngx.req.get_headers() local ip=headers["X-REAL-IP"] or headers["X_FORWARDED_FOR"] or ngx.var.remote_addr or "0.0.0.0" return ip end 阅读全文