After an outage on September 1, the Instructure Community is now fully available, including guides, release notes, forums, and groups. If some styling still looks unusual, clear your cache and cookies.
Found this content helpful? Log in or sign up to leave a like!
I'm starting to dig into building custom JS. Is there a recommended method to determine whether the script is being run from the test, beta, or production environments? Would just checking the page URL be sufficient?
Would you specify your question further? Meanwhile, the access tokens to the production environment API and to the test/beta are different, which prevents one from accidentally running the unwanted environment.
Hi @rtoon,
For Instructure cloud hosted Canvas instances, I think you can check the "ENV.RAILS_ENVIRONMENT" variable as a more universal way of determining the environment than just looking at the URL. Looking at the URL would be find if you're developing for a single canvas instance where you know for sure what the URL for each environment is, but if this is for wider audience, the URLS could vary and there could even be more than one URL for each environment.
-Chris
To interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in