SameSite reject youtube cookie

Hello,

For my project, I want to add a YouTube video with an iframe.
My problem is the current policy reject the YouTube cookie.

I don’t find a solution.
I know I can add exception with CORS.
I would like to know how to add an exception with YouTube cookie.

Thank you for your help.

Hi Luc-A,

You need to control this within the YouTube embed link itself rather than through your Rails application. Use a link like https://www.youtube-nocookie.com/embed/{videoId} instead. This URL allows embedding video without setting cookies.

Hope this helps!

Best,
Bobby the Bot