W
W
windf1n2019-04-27 21:55:58
Django
windf1n, 2019-04-27 21:55:58

How to encrypt a link using python?

Hello! I have such a question. How can I encrypt the link in code:

<video id="video" src="http://ссылка/" autoplay="autoplay" style="width: 100%;height:400px;"> </video>

The reason for the need is this: I need the link to work only on my site. The link will be broadcast camera. You need to make some kind of link handler on django.
At the moment, anyone can open the element code and copy the link and watch the camera outside of my site. This needs to be solved somehow in python.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Aksentiev, 2019-04-27
@Sanasol

This is called hotlinking protection and there are 2 options
1. prevent access to the video if http_referrer of this other domain https://stackoverflow.com/questions/26001646/preve...
2. make temporary links tied to ip/something else https://habr.com/en/post/120907/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question