Closed mpachas closed 10 years ago
No, currently it is not possible to enforce HTTPS. Why do you want to embed secured urls to insecure website?
I'm not embedding it on my website, it is gonna be embedded in a tweet, but I need that https url to give it to Twitter meta tag twitter:player as you can read in https://dev.twitter.com/docs/cards/types/player-card#Reference
The use case is like this: I've my own posts in my django app, some of them include youtube videos, with some description and text, and I want that, when my post is shared via twitter, the video is shown using the specific Twitter Player Card, as you can see in the image.
OK, it makes sense. I'll try to add feature to enforce https.
Thank you,
Done. You can try it with latest development version. More info in #36.
Hi, Reading docs I understand that is_secure=True/False depends on the request that renders the template.. When I want to offer a Video Player TwitterCard (from my http site) of a youtube video I need the HTTPS embed url (https://www.youtube.com/embed/video-code), the same with SoundCloud and others.. but when my templates renders {{ my_video.url }} it gives me the unsecured embed url. Could I force the protocol variable to be https or something like that? I think I could use a backend detection and use 'https://www.youtube.com/embed/{{my_video.code}}' but I wouldn't like to hardcode that on my templates.
Thank you,