Uploaded image for project: 'Z-Push'
  1. Z-Push
  2. ZP-1130

Improve default Autodiscover config

    Details

    • Type: Improvement
    • Status: QA
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: 2.3.4
    • Fix Version/s: 2.3.5beta1, 2.3.5
    • Component/s: None
    • Labels:
      None

      Description

      Currently, the configuration of autodiscover uses the hostname "localhost" in its value of SERVERURL. This is almost certainly incorrect. I was wondering if it is possible to use the value of $_SERVER['HTTP_HOST'] as default value instead? That would at least work by default in more cases.

      I was thinking about something along the lines of

      define('SERVERNAME', $_SERVER['HTTP_HOST'] ?: $_SERVER['SERVER_NAME']);
      define('SERVERURL', 'https://' . SERVERNAME . '/Microsoft-Server-ActiveSync');
      

      but of course the separate variable isn't really necessary. And of course there are other options as well: provide an empty value in the config file and use the above default if the value is empty. This is a matter of preference.

      Providing a more useful default like this will help in getting easy-to-use packages.

      I can provide a patch if anyone's interested.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Manfred Manfred Kutas
                Reporter:
                rolek Roel van Meer
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: