AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
Rails Database Per Environment - Can I Watch This Video?
Rails app is going to check if you have access and if you do, it's just going to read the video data out of the database. But now you kind of need, you can't just go to your CMS and say, hey, can I watch this video? Because like if we're using like sanity, it's outside of our they don't know. They're just their CMS. So that uses the token, like the session, the user session from the client. And so the question now is how to use that to fetch to make sure that you can only get the iframe of the actual thing if you're logged in. If you're not logged in, you