webder/README.md

25 lines
1.2 KiB
Markdown
Raw Normal View History

2024-03-21 12:23:37 +03:00
# webder
2024-03-21 14:47:07 +03:00
2024-04-26 21:34:29 +03:00
Proxy that renders client-side JavaScript apps (e.g. React apps) on server and returns the resulting HTML code.
2024-03-21 14:47:07 +03:00
2024-05-16 16:44:49 +03:00
| Response without proxy | With webder |
| ----------------------------------------------------------------- | -------------------------------------------------- |
| JS is disabled/unsupported, blank page or "Enable JS to continue" | all desired content, no need to use JS interpreter |
2024-03-21 14:47:07 +03:00
2024-04-26 21:34:29 +03:00
> [!WARNING]
> No HTML purification is performed, so passing code directly from webder can lead to XSS attacks. Local network requests are not blocked too, check domains/IPs to avoid SSRF attacks.
> Webder is **not** intended to be used as a standalone internet-facing browser wrapper. It is a kind of internal service to which other apps (maybe internet-facing) send API requests. Either restrict connections to `127.0.0.1` only, or put webder behind a firewall and a reverse proxy (probably with authentication).
2024-03-21 14:47:07 +03:00
## Usage
2024-05-16 16:44:49 +03:00
The proxy is accessible at `/render?url=...` by default.
2024-04-26 21:34:29 +03:00
For available config fields, check `.env.example`.
Docker is supported.
2024-03-21 14:47:07 +03:00
```bash
2024-05-16 16:44:49 +03:00
pnpm install
pnpm run build
pnpm start
2024-03-21 14:47:07 +03:00
```