Outlook 2016 querying Add-in root route

62 views Asked by At

So I have a question about some odd behavior I'm seeing in my Outlook Add-in logs and finally found the culprit. The client is Outlook 2016 and the user is backed by an on prem exchange server.

Whenever I open Outlook-2016 that has a user with the Add-in, Outlook seems to query the Add-in host for the root route https://<$host>/. This is odd because in my manifest I have not specified this path.

This is an easy enough fix to just add a root route, but my main question is why is it querying this route? Is it working as some sort of health check and if so can I specify another route that I already have a health check setup on?

1

There are 1 answers

0
gr347wh173n0r7h On BEST ANSWER

If anyone else runs into this issue, Outlook 2016 when opened performs an HTTP OPTION on the root route. In nodejs with express, the solution was

  router.options("/*", (req, res) => {
    res.header('Access-Control-Allow-Origin', '*');
    res.header('Access-Control-Allow-Methods', 'GET,POST,OPTIONS');
    res.header('Access-Control-Allow-Headers', 'Content-Type, Authorization, Content-Length, X-Requested-With');
    res.sendStatus(200);
  });