If nobody will disagree, I will consider this answer a definitive one.
Do you really think it is a good idea to load “external” content directly into the client?
Even if this “external” content is from yourself but only another domain.
In that moment, you create a strong dependency between this two domains. If you ever change the “external” domains content you also have to keep in mind, that this content is also needed for another domain. That raises the risk of error immense…
Most rest api architectures are built in this way. The apis live by themselves. Many times managed by different teams from the front end apps that consume them. It can somewhat depend on whether the api is specific to the app or can be reused across multiple apps like native mobile apps.
I just add that today I managed to do a workaround: using a relative path from a php variable (passed to a javascript one).
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.