Act as a web proxy server, render SPA website content and return the rendered html for better SEO or crawler. Also removed script tags in the html to prevent javascript running as the crawler does not need javascript in usual. It also detects User-Agent to decide whether render a desktop or a mobile view web page.
Run as Docker
docker run -it -d -p 8080:8080 -e PROXY_BASE=https://www.xenyo.com xenyo/spa-renderer
Change the PROXY_BASE env variable to your specific proxy target.
To return thr rendered html, just browse http://localhost:8080/ The url path will pass to the target server as well.
| Variable | Description | Default Value |
|---|---|---|
| PROXY_BASE | Proxy Target | NA |
| PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH | Chrome Execute Path | /usr/bin/chromium-browser |
| LISTEN_PORT | Server Listen Port | 8080 |
| REBUILD_CRON | Cron express for rebuild cache | 0 * * * * |
| REDIS_PORT | Redis connection port | 6379 |
| REDIS_HOST | Redis connection host | localhost |
API Base: /api/cache
| Path | Method | Default Description |
|---|---|---|
| /flush | Post | Flush all cache, include url list |
| /rm | Post | Remove all cache, except url list |
| /rebuild | Post | Rebuild cache from the url list |
yarn
yarn dev
Content type
Image
Digest
sha256:e1344f071…
Size
292.5 MB
Last updated
almost 3 years ago
docker pull xenyo/spa-renderer