I am developing a learning platform with Django Python. There will be a monthly subscription. People can watch videos and learn. I already made serving media files, videos, and images.
Now I face a problem. If I go to Chrome inspect, I can see the URL and access the video. The point is that users who are not subscribed can watch it.
I guess I need to encrypt the video with some key
. And the client-side (browser) should decrypt it. Only subscribed users can decrypt it with the key
. And there’s a question. What key can be? Django SECRET_KEY
in the settings.py
file or unique token for every user. What encryption algorithms should I use? Can you provide answers with encryption and decryption of the URL?