getsecure
Utility for securing expiring links
Usage
Add to nginx vhost secure location section like this
location /secret_page.html {
secure_link $arg_md5,$arg_expires;
secure_link_md5 "$secure_link_expires$uri <put here secret string>";
if ($secure_link = "") {
return 403;
}
if ($secure_link = "0") {
return 410;
}
}
Get secure link
python secure.py http://example.com/secret_page.html <put here secret string> --period=30
http://example.com/secret_page.html?md5=IQ6H6OQYGeUnlLEDgHfYNw&expires=1488221041
or
python secure.py /secret_page.html <put here secret string> --period=30
/secret_page.html?md5=IQ6H6OQYGeUnlLEDgHfYNw&expires=1488221041
where period is days from now to future when link should work
Release files for getsecure 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| getsecure-0.0.8.tar.gz | 2.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| getsecure-0.0.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.2 kB
Release files / getsecure-0.0.8.tar.gz
| Download URL | getsecure-0.0.8.tar.gz |
|---|---|
| Size | 2.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eeee782d082b595b58d2969ee6639399b64e3f1d993da2498f56bd6a9e19d470
|
|
BLAKE2b-256 checksum How to use checksums |
3eb4e469995200c7245d74d3e6689e7870e7a731967e30c82f3a6526448e1e47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|
Release files / getsecure-0.0.8-py3-none-any.whl
| Download URL | getsecure-0.0.8-py3-none-any.whl |
|---|---|
| Size | 2.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
34d5f01f4077d5f797f778c52dfd402ef492c820fa03598f37f3ee46966643de
|
|
BLAKE2b-256 checksum How to use checksums |
126f7f9f233ca646a375f6d56b4a8295b8921203409cb3df2ae790fe20aeda3b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|