mirror of
https://github.com/viq/NewsBlur.git
synced 2025-08-05 16:49:45 +00:00
Handling a mix of image proxy options.
This commit is contained in:
parent
7baa187566
commit
0d9f787d89
1 changed files with 1 additions and 0 deletions
|
@ -396,6 +396,7 @@ def create_imageproxy_signed_url(base_url, hmac_key, url, options=None):
|
|||
str: A full url that can be used to serve the proxied image
|
||||
"""
|
||||
if not options: options = []
|
||||
if isinstance(options, int): options = [str(options)]
|
||||
if not isinstance(options, list): options = [options]
|
||||
base_url = base_url.rstrip('/')
|
||||
signature = base64.urlsafe_b64encode(hmac.new(hmac_key, msg=url, digestmod=hashlib.sha256).digest())
|
||||
|
|
Loading…
Add table
Reference in a new issue