How to create and store Signed urls inside mongodb?
I have a document inside mongodb and inside these documents i have stored song urls comming from cloudinary .If i show these information inside client side then these urls will be fetched and anyone can get and directly use those urls ,i want to ask what is the better way of hiding or encrypting those urls so that n one can directly use them or those urls only be fetched by my website ...
Answers
-
Hi muhammad,
Thanks for reaching out.
Yes, you are right, the URLs can be distributed if known. However, if you want secured URLs there are several ways to do it:
1) Enable Strict Transformation- If your URLs include transformations such as f_auto , g_auto, w_300 etc, you can enable something called strict transformations so that the URLs cannot be modified.
Please refer to the below documentation for more information:
https://cloudinary.com/documentation/control_access_to_media#strict_transformations
2) You can provide authenticated access to these URLS:
https://cloudinary.com/documentation/control_access_to_media#authenticated_access_to_media_assets
Since your account is a Free, the option that you can only use is Signed URL as shown below: https://cloudinary.com/documentation/control_access_to_media#signed_url_authentication
Hope this helps, please let me know if you have any further questions.
Best regards,
Sreenath
0