As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
There shouldn't be any relationship between the web script URL and the canvas URL.
You are already storing the app ID and the secret in that app file. Why not store the canvas URL in there and then change the getCanvasURL() method to read it from that file?