APP_URL env variable can't be set

I’m having a really odd problem with render. The env variable APP_URL always returns as my render domain minus the “https://”

No matter what i set it as or where i set it. I can get all other env variables fine but that one just won’t take. I’m getting around the problem by creating a new variable BASE_URL but I was wondering if there was anyway to avoid having to do that and being able to overwrite the APP_URL variable?

Hi there,

Thanks for reaching out.

You’ve not really covered how you’re setting or reading these variables. You may want to double-check the variable at a few points:

  • The obvious one, that the APP_URL env var you’ve set includes https:// and that you’ve had a successful deploy since setting it.
  • If using shared env groups, check if the same var/value is set.
  • Check in the “Shell” tab what value is returned in the environment, e.g. echo $APP_URL

If those values are as you expect, I would guess you’re seeing the issue when reading the value in code and something there may be stripping it?

Hope that helps


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.