title: firebase functions (emulator) + axios behaves differently on Windows and Mac
body: <p>When I run a firebase functions locally on emulator, it works expectedly on Windows, but the same code doesn't work on Mac environment(I tried on two Mac: M1 and Intel, and neither doesn't work).</p>
  <p>What I want to do is axios.post() to a specific API endpoint with:</p>
  <ol>
  <li>query strings as authorization keys</li>
  <li>accessing through squid proxy(SSL enabled) to make source IP address fixed</li>
  </ol>
  <p>My firebase functions code here:</p>
  <pre><code>import functions from 'firebase-functions'
  import https from 'https'
  import axios from 'axios'
  import {createHash} from 'crypto'
  
  export default functions.region('asia-northeast1').https.onRequest(async (req, res) =&gt; {
    const sharedKey = &quot;abcdefghijklmn&quot;
    const randomKey = &quot;opqrstuvwxyz&quot;
    const sha256Hex = createHash(&quot;sha256&quot;).update(sharedKey+randomKey).digest(&quot;hex&quot;)
    const base64Encoded = Buffer.from(sha256Hex).toString('base64')
  
    await axios.post(
      `https://my.target.api.com`,
      {},
      {
        params: {
          auth_cd: base64Encoded,
          auth_key: randomKey,
          companyId: &quot;myCompany&quot;
        },
    // Below is just to avoid axios's error &quot;Hostname/IP does not match certificate's
        httpsAgent: new https.Agent({
          rejectUnauthorized: false,
        }), 
        proxy: {
          protocol: &quot;https&quot;,
          host: &quot;my.squid.proxy.com&quot;,
          port: 8080,
          auth: {
            username: &quot;username&quot;,
            password: &quot;password&quot;
          }
        }
      }
    )
    .then(result =&gt; {
      console.log(result)
    }).catch(error =&gt; {
      console.log(error);
    })
  
    res.status(200).end()
  })
  
  </code></pre>
  <p>And this gives me an error &quot;ERROR_LOGIN_AUTH_FAILED&quot; on Mac, which is reproducible on Windows too in condition that one or more of the three params (auth_cd/auth_key/companyId) are wrong.</p>
  <p>Also, I made development environment same both on Mac and Windows:</p>
  <ul>
  <li>Node.js: 14.19.3 (actually, here is another problem that if it's v16, the code above doesn't work on Windows too...)</li>
  <li>Java(firebase-functions uses): 11.0.16</li>
  <li>all the npm packages versions</li>
  <li>axios/firebase-functions/firebase-tools are the latest</li>
  <li>The other codes are the same too (cloned freshly from remote git repo)</li>
  </ul>
  <p>I suspect this must be triggered some sort of difference on internal handling (like char code?) in axios, but no clues in my hand...</p>
  <p>Any advice would be appreciated.</p>