New option to use and configure Prosody mod_firewall WIP (#97):
* new setting * new configuration screen for Peertube admins * include the mod_firewall module * load mod_firewall if enabled * sys admin can disable the firewall config editing by creating a special file on the disk * user documentation
This commit is contained in:
26
client/common/admin/firewall/register.ts
Normal file
26
client/common/admin/firewall/register.ts
Normal file
@ -0,0 +1,26 @@
|
||||
// SPDX-FileCopyrightText: 2024 John Livingston <https://www.john-livingston.fr/>
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import type { RegisterClientOptions } from '@peertube/peertube-types/client'
|
||||
import { html, render } from 'lit'
|
||||
import './elements' // Import all needed elements.
|
||||
|
||||
/**
|
||||
* Registers stuff related to mod_firewall configuration.
|
||||
* @param clientOptions Peertube client options
|
||||
*/
|
||||
async function registerAdminFirewall (clientOptions: RegisterClientOptions): Promise<void> {
|
||||
const { registerClientRoute } = clientOptions
|
||||
|
||||
registerClientRoute({
|
||||
route: 'livechat/admin/firewall',
|
||||
onMount: async ({ rootEl }) => {
|
||||
render(html`<livechat-admin-firewall .registerClientOptions=${clientOptions}></livechat-admin-firewall>`, rootEl)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
registerAdminFirewall
|
||||
}
|
Reference in New Issue
Block a user