-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I use signed image URLs with a custom CDN? #3503
Comments
Hi @alexmacarthur, Yes, you can use a custom CDN and generate a custom URL as you like. You need to override the CDNClient in the iOS SDK. Here is the documentation: https://getstream.io/chat/docs/sdk/ios/client/custom-cdn/ Best, |
@nuno-vieira Thanks - it looks like that only impacts the one-time upload, though. I could generate a signed URL that works for only 10 minutes, and then ever time it's rendered in the future (after 10 minutes), that custom link would be broken. As far as I can tell, I can't regenerate the URL each time it's rendered. |
@alexmacarthur How do you regenerate the URL, is it client-side or server-side? |
@nuno-vieira I presume I'd generating the URL on our server, and then providing that to the client. It'd very similar to how Stream generates its signed URLs. ![]() |
Hi @alexmacarthur, We also have If Best, |
Thanks, @nuno-vieira! That |
Nice! Please let us know if that worked for you so that we can update the documentation. Best, |
What are you trying to achieve?
I want to use an S3 bucket to host my uploaded images, but I do not want to make those links publicly available for anyone. Is it possible to have Stream use signed URLs with these images? Or I am I stuck with using Stream's CDN if I want to maximize security this way?
If possible, how can you achieve this currently?
I considered restricting bucket access to Stream's IPs, but I noticed that React implementations still use the direct CDN link (signed) in the browser, which means that won't work.
What would be the better way?
It'd be nice to be able to give Stream a unique identifier for a resource, and then easily override the UI components to generate a signed URL every time it's rendered. I hope I'm not missing some existing functionality there. That'd be embarrassing.
GetStream Environment
GetStream Chat version: 4.66.0
GetStream Chat frameworks: StreamChat, StreamChatUI, eventually React
iOS version: 17+
Swift version:
Xcode version: 16.1
Device: MacBook Pro M2 Max
Additional context
The text was updated successfully, but these errors were encountered: