I am developing a lightning application that points to a web application using Canvas Frame (IFrame can also be used). Every customer has a specific instance of myApp with a different subdomain. For example CUSTOMER1.myApp.com, CUSTOMER2.myApp.com.
I am currently using a Canvas Frame to display the Web App in a Salesforce Visual Page. Is there a way to change the subdomain in the Package? As far as I know, it is only possible to use
app.setCanvasUrlPath('/alternatePath'), but this will not change the subdomain.
I have in mind two solutions, but I am not sure if they are optimal or will pass the security check.
Create the package and set the default URL to FREETRIAL.myApp.com This will be submitted for Security Review -> Published in the AppExchange.
We can then create customized packages for customers, updating the URL to CUSTOMERX.myApp.com and sending them the package individually. Is this an accepted practice? Is completely not optimal since we need to create a package per customer.
Pointing the default Canvas app to a redirection URL. For example www.myApp.com/redirection. Passing the information from the customer (Subdomain name) using
app.setCanvasUrlPath()and handling the redirection to the right instance in www.myApp.com/redirection. Will this pass the security review?