feat: add support for disabling specific tools in self-hosting
- Introduced build-time and runtime options to disable tools for compliance or security. - Updated documentation to include instructions for disabling tools in Docker and Kubernetes setups. - Added translations for disabled tool messages in multiple languages. - Implemented logic to filter out disabled tools from the toolbox and shortcuts in the application. - Created utility functions to manage disabled tools configuration.
This commit is contained in:
@@ -138,6 +138,34 @@ docker build \
|
||||
|
||||
Branding works in both full mode and Simple Mode, and can be combined with all other build-time options (`BASE_URL`, `SIMPLE_MODE`, `VITE_DEFAULT_LANGUAGE`).
|
||||
|
||||
### Disabling Specific Tools
|
||||
|
||||
Hide individual tools for compliance or security. Disabled tools are removed from the homepage, search, shortcuts, workflow builder, and direct URL access.
|
||||
|
||||
Tool IDs are the page URL without `.html` — open any tool and look at the URL (e.g., `edit-pdf`, `sign-pdf`, `encrypt-pdf`).
|
||||
|
||||
**Build-time** (baked into the bundle):
|
||||
|
||||
```bash
|
||||
DISABLE_TOOLS="edit-pdf,sign-pdf" npm run build
|
||||
```
|
||||
|
||||
**Runtime** (no rebuild needed — mount a `config.json`):
|
||||
|
||||
```json
|
||||
{
|
||||
"disabledTools": ["edit-pdf", "sign-pdf"]
|
||||
}
|
||||
```
|
||||
|
||||
```bash
|
||||
docker run -d -p 3000:8080 \
|
||||
-v ./config.json:/usr/share/nginx/html/config.json:ro \
|
||||
ghcr.io/alam00000/bentopdf:latest
|
||||
```
|
||||
|
||||
Both methods can be combined — the lists are merged. See the [Docker guide](/self-hosting/docker#disabling-specific-tools) for full details.
|
||||
|
||||
## Deployment Guides
|
||||
|
||||
Choose your platform:
|
||||
|
||||
Reference in New Issue
Block a user