https://github.com/maratsh/getsecure
Utility for securing expiring links
https://github.com/maratsh/getsecure
links nginx secure
Last synced: about 2 months ago
JSON representation
Utility for securing expiring links
- Host: GitHub
- URL: https://github.com/maratsh/getsecure
- Owner: maratsh
- License: mit
- Created: 2017-01-28T18:32:20.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-08-06T11:48:41.000Z (almost 2 years ago)
- Last Synced: 2025-02-18T16:48:06.373Z (over 1 year ago)
- Topics: links, nginx, secure
- Language: Python
- Homepage:
- Size: 30.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# getsecure
Utility for securing expiring links
## Usage
### Add to nginx vhost secure location section like this
```nginx
location /secret_page.html {
secure_link $arg_md5,$arg_expires;
secure_link_md5 "$secure_link_expires$uri ";
if ($secure_link = "") {
return 403;
}
if ($secure_link = "0") {
return 410;
}
}
```
### Get secure link
```bash
python secure.py http://example.com/secret_page.html --period=30
http://example.com/secret_page.html?md5=IQ6H6OQYGeUnlLEDgHfYNw&expires=1488221041
```
or
```bash
python secure.py /secret_page.html --period=30
/secret_page.html?md5=IQ6H6OQYGeUnlLEDgHfYNw&expires=1488221041
```
where period is days from now to future when link should work