New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: get https embed url #34

Closed
mpachas opened this Issue Jul 20, 2014 · 5 comments

Comments

Projects
None yet
2 participants
@mpachas
Member

mpachas commented Jul 20, 2014

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,

@yetty yetty added question labels Jul 21, 2014

@yetty yetty self-assigned this Jul 21, 2014

@yetty

This comment has been minimized.

Collaborator

yetty commented Jul 21, 2014

No, currently it is not possible to enforce HTTPS. Why do you want to embed secured urls to insecure website?

@mpachas

This comment has been minimized.

Member

mpachas commented Jul 21, 2014

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.

twitter-cards-video

@yetty

This comment has been minimized.

Collaborator

yetty commented Jul 21, 2014

OK, it makes sense. I'll try to add feature to enforce https.

@yetty yetty added this to the v0.11 milestone Jul 21, 2014

@mpachas

This comment has been minimized.

Member

mpachas commented Jul 21, 2014

Thank you,

@yetty yetty modified the milestones: v1.0, v0.11 Jul 26, 2014

@yetty yetty closed this in 4520341 Jul 26, 2014

@yetty

This comment has been minimized.

Collaborator

yetty commented Jul 26, 2014

Done. You can try it with latest development version. More info in #36.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment