## Secure Link for Nginx

### About

Secure Link for Nginx is a shortcode plugin for Wordpress to embed hash code for
link that want to be protected. This plugin must be use when nginx web server
already configuring with [secure link module](http://nginx.org/en/docs/http/ngx_http_secure_link_module.html)

### Howto

We use this asumption when configuring nginx and using this plugin at wordpress
post:
- Folder that want to secure is /secure under wordpress folder
- File that want to use is img.png

#### Nginx configuration
Under your wordpress configuration at nginx, add this configuration:

```
    location /secure {
        secure_link $arg_sln;
        secure_link_md5 "$uri$remote_addr$http_user_agent";

        if ($secure_link = "") { return 403; }
        if ($secure_link = "0") { return 410; }
    }
```

#### Using shortcode
Shortcode can be use with parameter or without it. Suppose you want to protect
img.png file under /secure folder, using with parameter:
```
<img class="" src="/secure/img.png[sln_create slfile='/secure/img.png']" />
```
using it whitout parameter:
```
<img class="" src="[sln_create]/secure/img.png[/sln_create]" />
```
