Minimal proxy for the public giscus widget so you can embed it from your own origin.
GET /widget→https://giscus.app/en/widget(with optional replacements viarep=)GET /en/widget→https://giscus.app/en/widget(alias)- All other paths are proxied unchanged to
https://giscus.app/<same-path>
HOST(default0.0.0.0) andPORT(default8080)- Or set
ADDR(e.g.:8080or127.0.0.1:8080).ADDRbeatsHOST/PORT.
go run ./cmd/giscus-proxy
# or with custom port
PORT=9000 go run ./cmd/giscus-proxyBuild and run:
docker build -t giscus-proxy:latest .
docker run --rm -p 8080:8080 -e PORT=8080 giscus-proxy:latestOverride port:
docker run --rm -p 9000:9000 -e PORT=9000 giscus-proxy:latest- Create a new service from this repo.
- Railway detects the Dockerfile automatically.
- Set variables:
PORT=8080(Railway injectsPORT; our app reads it)- Optional:
HOST=0.0.0.0
- Expose the service; Railway gives you a public URL.
Health check path: /widget.
The repository ships with a serverless handler under api/index.go and a
vercel.json rewrite that forwards every request to it. Deploying through the
"Deploy with Vercel" button or via vercel deploy builds a Go Serverless
Function, so no Docker support is required. Once deployed, the instance exposes
the same routes described above.
You can set HOST, PORT, or ADDR environment variables if you want to run
the binary locally with vercel dev, but they are not required for production
deployments on Vercel.
git clone <this-repo>
cd giscus-proxy
docker build -t giscus-proxy:latest .
docker run -d --name giscus-proxy \
-p 8080:8080 \
-e HOST=0.0.0.0 -e PORT=8080 \
--restart unless-stopped \
giscus-proxy:latestPut a reverse proxy in front (Caddy / Nginx / Traefik) if you want HTTPS and a domain.