I have a springboot project and use huawei's cloud to store pictures and videos. The problem is how can I prevent other people from seeing the photos/videos when they have a CDN address that I have not allowed.
I tried to find out, I know the cloud server side can solve this problem
But I want to know if there is a way to handle it on the code side, if so, how? Please let me know if you have the answer.
Sorry I am not allowed to show the project code.
Thanks!!
Here is a way but it is impossible to guarantee 100% that photos/videos won't be leaked if another user gets the URL. The solution is to use
signed URLs
with a validity period. legal users can still get a regenerated signed URL even after the original one has expired.You can shorten the expires to increase security . but nothing is completely secure.