Skip to content

Instantly share code, notes, and snippets.

@throughnothing
Forked from davide-romanini/nginx_unique_id
Created March 29, 2013 09:03
Show Gist options
  • Save throughnothing/5269669 to your computer and use it in GitHub Desktop.
Save throughnothing/5269669 to your computer and use it in GitHub Desktop.
perl_set $uid '
use Digest::MD5 qw(md5_hex);
sub {
return md5_hex(`od -vAn -N4 -tu4 < /dev/urandom`);
}';
#pass to fcgi
location ... {
fastcgi_param UNIQUE_ID $uid
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment