{"action":"opened","issue":{"url":"https://api.github.com/repos/jazzband/django-embed-video/issues/87","repository_url":"https://api.github.com/repos/jazzband/django-embed-video","labels_url":"https://api.github.com/repos/jazzband/django-embed-video/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/jazzband/django-embed-video/issues/87/comments","events_url":"https://api.github.com/repos/jazzband/django-embed-video/issues/87/events","html_url":"https://github.com/jazzband/django-embed-video/issues/87","id":324422165,"number":87,"title":"`is_secure=True` fails when django reverse proxied","user":{"login":"tobyspark","id":197773,"avatar_url":"https://avatars1.githubusercontent.com/u/197773?v=4","gravatar_id":"","url":"https://api.github.com/users/tobyspark","html_url":"https://github.com/tobyspark","followers_url":"https://api.github.com/users/tobyspark/followers","following_url":"https://api.github.com/users/tobyspark/following{/other_user}","gists_url":"https://api.github.com/users/tobyspark/gists{/gist_id}","starred_url":"https://api.github.com/users/tobyspark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobyspark/subscriptions","organizations_url":"https://api.github.com/users/tobyspark/orgs","repos_url":"https://api.github.com/users/tobyspark/repos","events_url":"https://api.github.com/users/tobyspark/events{/privacy}","received_events_url":"https://api.github.com/users/tobyspark/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-18T13:58:46Z","updated_at":"2018-05-18T13:58:46Z","closed_at":null,"author_association":"NONE","body":"The plugin fails to display YouTube video on https, when reverse proxied.\r\n\r\nDetail – My django app is deployed behind a nginx proxy. Nginx terminates the incoming https connection, and passes on the connection internally unsecured. So `request.scheme` always reports `http` even though it is for all intents and purposes `https`.\r\n\r\nInvestigation – In `def get_backend(backend_or_url, context=None, **options)`, the line `backend.is_secure = context['request'].is_secure()` sets is_secure false in this circumstance. Setting `is_secure=True` in the app's template as per the documentation does not override this (should it be passed in through `options`, if so it is not being passed through in my case).\r\n\r\nhttps://github.com/jazzband/django-embed-video/blob/master/embed_video/templatetags/embed_video_tags.py#L167 \r\n\r\nAnd – thanks to all who've worked on `django-embed-video`!"}}
{"actor":{"display_login":"tobyspark"}}