AccessTokenResult.baseUrl is 0.0.0.0

Hi all,

i noticed that on a self hosted grist installation the plugin api for getAccessToken (grist-plugin-api - Grist Help Center)

const tokenInfo = await grist.docApi.getAccessToken({readOnly: true});
console.log(tokenInfo.baseUrl)

returns a url like this:

http://0.0.0.0:8484/o/docs/api/docs/irtKNL9u3sBr/attachments/3/download?auth=eyJhbG..o400w

So the host is: 0.0.0.0 this does not work.
Is this a setting in my grist installation? Or is this a bug?

Ouch, thanks for flagging that @enthus1ast. I think that ultimately the domain in that URL may come from:

Do you have an APP_HOME_URL environment variable set? If not, can you try setting APP_HOME_URL to e.g. http(s)://however.your.grist.install.is.reached, and see if that helps?

1 Like

Yes that fixed it! Thank you!

I’ve added this to my local docker command line:

-e APP_HOME_URL="http://127.0.0.1:8484"

1 Like