Restrict embed to specific domain? #875
Replies: 1 comment
-
You can add a new state on files.models.MEDIA_STATES , and then you have to run makemigrations && migrate Django commands to get the new values populated. Then adjust the logic on files.methods.get_next_state on how This will allow the new state to appear on the list while editing a Media. Since this is a new state, you will have to see how the field
you now might have to do a
And then of course it would make sense to adjust the code that prevents a media from getting embedded by another domain (most probably done through nginx settings?) There's room for refactoring here to bring these pieces on a single place, so feel free to consider opening a PR!!! Regards |
Beta Was this translation helpful? Give feedback.
-
How can I add a custom state?
I'd like to have a private video that is only allowed to be embedded on specific domains. You can see an example of this in Vimeo.
Beta Was this translation helpful? Give feedback.
All reactions