I tried to do this in a function, but after redirecting to the bucket and try to play video, i get CORS error: The 'Access-Control-Allow-Origin' header has a value 'https://localhost/' that is not equal to the supplied origin. Origin is from my app so this is a bit off.
TL;DR
Developers are trying to redirect a pretty URL to a storage bucket, but face a CORS error due to mismatched origins. The 'Access-Control-Allow-Origin' header value needs to match the app's origin for smooth operation.