How to allow customs hosts in development mode

I’m assuming you mean by “did not work” you still got the same error as the OP? It looks like you’re using docker for development, so you need to set this environment variable inside the container, not the host machine. I don’t use docker for development, but it looks like d/boot_dev can set variables inside the container for you:

d/boot_dev -e DISCOURSE_DEV_HOSTS=xxx.ngrok.io

And then run d/unicorn.