respondcreate / django-versatileimagefield

A drop-in replacement for django's ImageField that provides a flexible, intuitive and easily-extensible interface for quickly creating new images from the one assigned to the field.
http://django-versatileimagefield.readthedocs.io/
MIT License
531 stars 88 forks source link

HTTPS url instead of HTTP #89

Closed BenDevelopment closed 7 years ago

BenDevelopment commented 7 years ago

Hi,

Thank you for your work, that's a good plugin!

I have a question about URLs, how can I say versatileimagefield to use HTTPS instead of HTTP in the returned URLs?

 {
        'large': 'https://some.url/image.jpg',
        'medium': 'https://some.url/__sized__/image-crop-400x400.jpg',
        'small': 'https://some.url/__sized__/image-thumbnail-100x100.jpg',
    }
matthiask commented 7 years ago

Probably request.is_secure() returns False instead of True in your installation?

(Maybe set SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https')?)

BenDevelopment commented 7 years ago

Yes the problem comes from this. It doesn't works in my case but I guess I have a problem with my server configuration. My problem is described here: http://stackoverflow.com/questions/43189444/cannot-activate-https-links-with-django-and-nginx But this is not a django-versatileimagefield problem, I close the issue.

Thank you for your help !