0

I'm using hotlink protection in a nginx server with set_misc_nginx_module using sha-1,I'd like to change this to sha-256,

My current settings are this:

root /var/www/streamboat.tv;
set $secret "secret";

location ~ ^/live/.+\.m3u8$ {
    set_sha1 $expected_digest "${secret}${remote_addr}";

    if ($expected_digest != $arg_digest) {
        return 403;
    }
}

In this case set_sha1 $expected_digest "${secret}${remote_addr}"; is where I'd like to change to sha-256, How could I make this update? Should I use another module?

Nexdevs
  • 3
  • 1

1 Answers1

0

Nginx does not have a sha256 module for this (https://www.nginx.com/resources/wiki/modules/set_misc/). Why do you want to make this change? SHA1 should be good enough for this level of protection.

Jason Martin
  • 4,865
  • 15
  • 24