-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to block certain domains from being imported with url #6537
Comments
Hi, I think an "allowlist" of URL host would be a better solution than a "blocklist", because with a blocklist a user can easily setup a domain name that redirects to a blocked URL. |
That is a much better idea, and would work perfectly for my case too. I completely forgot about redirecting when I was trying to do this |
What hooks should I use to get the url when uploaded, and then block? |
|
apparently I suck at JavaScript. I cant figure out the structure that the plugin needs, https://github.com/Xudros/peertube-plugin-auto-block-domain this is what I have right now and its pretty much just a cobbled together mess. |
I figured it out, the plugin is published for anyone also wanting this feature |
Describe the problem to be solved
I'm currently in need of a way to block certain domains that I don't want to be imported to my instance through the URL import.
Describe the solution you would like
I was trying to make a plugin but as I'm very inexperienced with this I cant do it alone, my idea is that when someone imports a URL, it takes the start of it like "https://example.com" scans until the end and stops right before it gets a third / or a : as that's what is normally after the domain, and compares it to a list you'll be able to make in settings, I have parts of a plugin made for it but as I don't know how to use the hooks in peertube to get the URL or even the right hook to try and use for when they upload a URL or even if I should be using hooks but I'm assuming so, if someone can point me in the right direction for the plugin I can do my best, or if this becomes a new feature in an update awesome!
The text was updated successfully, but these errors were encountered: