Skip to main content

Hosting and browser access

For hosted or self-hosted deployments, point clients at the HTTPS origin serving the Cocktail Manager app. The browser-based reference and the app can run on different hosts. A Docker service name may work inside your network but isn't a public URL for your integration.

Browser access and CORS​

Start with curl for integration testing. The Try it panel runs a request from your browser, to the server selected in the operation. The selected server must be the instance that issued your key, and it must be reachable from your browser. If your self-hosted origin isn't in the server list, use curl instead.

Cross-origin requests with a Bearer header normally need an OPTIONS preflight. Routes using the app's v1 CORS middleware (including GET /api/v1/me, the cocktail list and the queue) allow Authorization and Content-Type. They use * for the origin by default. An operator can set API_CORS_ALLOWED_ORIGINS to a comma-separated list of exact origins (scheme, host and port if applicable, no path). These routes do not allow credentialed cross-origin requests with session cookies. Some hand-wired routes, such as workspace backups and cocktail image or export handlers, don't use this middleware.

If curl succeeds and Try it fails, confirm the target server, route and method. Check whether the app or proxy answers OPTIONS with the required headers, and whether the browser blocks the request due to mixed content (for example, an HTTPS docs page calling an HTTP app) or network access restrictions. An OPTIONS success alone doesn't mean a protected request is authorized.

CORS is a browser policy, not API authentication or a restriction on curl and other server-to-server clients. Keep workspace keys on the backend rather than shipping them in frontend code. If using Try it, use a short-lived test key in a trusted browser, check the full request URL, and never share a generated snippet containing an authorization header. The console can retain credentials in browser session storage. Clear the test credential or close the tab, and revoke it once finished.

Proxy configuration and rate limits​

  • Rate limits: The app uses per-process, IP-based rate limiting on routes such as public guest-menu, public-image and signage endpoints. These limits do not cover authenticated workspace image endpoints. Some actions, such as guest menu PIN entry, also have action-specific limits. The app's token bucket returns 429 and Retry-After in seconds. There is no shared per-key quota to assume across v1. Proxies or managed hosts can enforce their own limits.
  • Proxy trust: Behind a proxy, configure TRUST_PROXY to match the path clients actually take. With it unset the app uses the socket address, so requests via a proxy can share a bucket. true trusts one hop; a number counts from the right of X-Forwarded-For. Use cloudflare only if the origin is reachable exclusively through Cloudflare. Do not trust client-controlled forwarding headers.

For deployment prerequisites, secrets, and upgrades, see Self-hosting.