I have installed DXA 1.4 on Web8 (CU1). Its all working fine, and as part of development I added a bunch of baseUrls for my web app: http://localhost:1234, http://somedomain.local, http://otherdomain:1234 and so on) using Set-TtmWebsite powershell scriptlet so I can run the site from local dev env, and also access the site running on a central web server with a variety of domains and ports.
I noticed that the dynamic links resolved are not relative; they have the a domain and port prefixed on them. This is causing problems as the domain/port is always the same; http://localhost:1234, no matter what domain/port is in the URL request, this means the links are broken when I request the site from http://otherdomain:1234 (as they all point to localhost)
I gathered from the docs you can override TTM behaviour by setting OverrideDiscoveryService
to true in cd_link_conf.xml
and thus have all resolved links relative to the site root, rather than with a domain/port added.
I tried this but with no joy - the . In fact, the domain/port prefix used actually changed from localhost:1234 to otherdomain:1234. After making the change I ran the discover-registration.jar
update and restarted the discovery, content and web applications.
So the question is how does TTM determine the domain/port used for linking, and how can I change this (either in topology manager, or how do I get it to use the configuration from cd_link_conf.xml
)
Update: After restarting everything again it works, so I obviously missed something. However the question remains about if you allow TTM to configure linking, how does it work out which domain/port to use?