/selenoid-api-proxy

Tiny web server, which runs in front of Selenoid API and provides token-based authorization.

Primary LanguageGoThe UnlicenseUnlicense

Selenoid API Proxy

Tiny web server, which runs in front of Selenoid API and provides token-based authorization.

Usage

  • Delete video
curl -X DELETE -H "X-Token:token-here" https://grid-api.kyberorg.io/videos/yalsee-dev-130821-1012

Run

  • Minimal configuration example
selenoid-api-proxy --token myCustomTokenHere
  • Fully customized params example
selenoid-api-proxy --port 4443 --selenoid.api.url=http://localhost:4444  --token myCustomTokenHere

or same with env vars

SELENOID_API_URL=http://localhost:4444 PORT=4443 TOKEN=myCustomTokenHere selenoid-api-proxy

Help

selenoid-api-proxy --help

Systemd Daemon

[Unit]
Description=Selenoid API Proxy
Wants=network-online.target
After=network-online.target

[Service]
Type=simple
Restart=always
RestartSec=5s
Environment="TOKEN=my-token-here"
WorkingDirectory=/srv/selenoid-api-proxy
ExecStart=/srv/selenoid-api-proxy/selenoid-api-proxy \
    --port=4443 \
    --selenoid.api.url=http://localhost:4444

SyslogIdentifier=selenoid-api-proxy

[Install]
WantedBy=multi-user.target

Build

make binary

or without make

 CGO_ENABLED=0 go build github.com/kyberorg/selenoid-api-proxy/cmd/selenoid-api-proxy