title: Esri-arcgis request intercept based on wildcard route
body: <p>I'm trying to implement a MapLayer in my react application. The map is only accessible over a proxy which needs authentication to identify the users for each end every request.</p>
  <p>To provide the token i added the following request interceptor to make sure all calls which access that backend would be expanded by the authorization. If i do it this way there is no header added to the requests.</p>
  <pre><code>esriConfig.request.interceptors.push({
    urls: ['backend/api/*'],
    before: async function (params: any) {
      params.requestOptions.headers = {
        Authorization: 'Bearer ' + token),
      };
    },
  });
  </code></pre>
  <p>If i remove the urls parameter so that all routes are extended with the token I'll recieve some cors errors because the esri package also makes some calls to another api where i get blocked because i'm sending an authorization header which is not expected.</p>
  <p>Other api:
  <a href="https://www.arcgis.com/sharing/rest/portals/self?f=json&amp;culture=de-de" rel="nofollow noreferrer">https://www.arcgis.com/sharing/rest/portals/self?f=json&amp;culture=de-de</a></p>
  <p>How can i make sure only requests to my api will be extended with the autorization header?</p>