Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-1180 HST REST Engine
  3. HSTTWO-1203

Have the HstLinkImpl use SiteMount and use the hostname belonging to the SiteMount when external = true

    XMLWordPrintable

Details

    • Sub-task
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • 2.10.00
    • 2.10.01
    • None
    • None

    Description

      For cross-domain and external (including http) linking we need to be able to create a link 'out' of the current domain. For example, link from the current hostname, 'www.onehippo.org' to 'docs.onehippo.org'

      Therefore, the logic :

      if(external) {
      urlString = requestContext.getBaseURL().getHostName() + urlString;
      }

      must be replaced by fetching the hostname from the SiteMount where the Link belongs to.

      Even without external explicitly set to true, we might need to rewrite a link to include http as it might be a link in a different domain. Therefore, we will test the following:

      1) If the SiteMount of the HstLinkImpl is different then the one from the current request
      AND
      2) If the VirtualHost belonging to the SiteMount is different then the one from the current request

      If (1) and (2) apply, we will need to create a link including the 'http//....' part

      Attachments

        Activity

          People

            aschrijvers Ard Schrijvers
            aschrijvers Ard Schrijvers
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: