How to configure CSP for MP4 video file served under public/videos directory
Unanswered
Saltwater Crocodile posted this in #help-forum
Saltwater CrocodileOP
As the title suggest I have been struggling for the past 2 days on this CSP error.
I have an MP4 file under public/videos/file.mp4 and use it in NextJS app.
It is properly showing locally but when served in Vercel on preview the CSP error kicks in.
I already have this on my configuration
I have an MP4 file under public/videos/file.mp4 and use it in NextJS app.
It is properly showing locally but when served in Vercel on preview the CSP error kicks in.
I already have this on my configuration
media-src 'self' blob: data: /videos/;
is it possible?4 Replies
American black bear
How big is your mp4 file?
Also you should be very careful when serving large files, such as videos, directly from next.js public folder on serverless platforms such as Vercel!
Saltwater CrocodileOP
It's around 5MB in size, what's the reason why I should not use the public folder?
I haven't tried uploading it on an external provider and use that url to serve the file