How do i make the link for the secure link module in nginx using python? I'm looking to use nginx to serve secured files that have expiring links. Link to Nginx Wiki
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
The accepted answer is incorrect because it only hashes the secret, not the combination of secret, url, and expiration time.
Corresponding section of a nginx.conf
The code from shadfc's answer works. For Python 3, some modifications are necessary:
data is your generated url of the form: