Websocket Connection from Hass.io Addon Won't Authenticate

I’m trying to connect a websocket client to Home Assistant via a Hass.io addon.

This means I have the HASSIO_TOKEN environment variable with a valid token.

I then pass that on to my website, where I create the connection in Javascript.

If I use a long-lived access token, it works great.

But if I run it in a Hass.io addon container (where we aren’t supposed to need LLATs!), it doesn’t work.

Any ideas?