title: Can't get proxy working in my react and node app
body: <p>I'm making a react client app with a node.js express backend. Here is my project structure:</p>
  
  <p><a href="https://i.stack.imgur.com/8rID0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8rID0.png" alt="enter image description here"></a></p>
  
  <p>The client app is using a proxy, so in its package.json, it has the line:</p>
  
  <pre><code>"proxy": "https://localhost:5000"
  </code></pre>
  
  <p>This seems to cause the following error:</p>
  
  <p>The browser requests a favicon.ico at the URL <code>/favicon.ico</code>. Normally, this would be a request to the react app, so the request would be made to <code>localhost:3000/favicon.ico</code>. But since we're now using a proxy, the request gets sent to <code>localhost:5000/favicon.ico</code>, note the change in port number. This causes a proxy error, here's what it says in the terminal:</p>
  
  <pre><code>Proxy error: Could not proxy request /favicon.ico from localhost:3000 to https://localhost:5000.
  [1] See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (EPROTO).
  </code></pre>
  
  <p>In the browser, it says <code>GET http://localhost:3000/favicon.ico 500 (Internal Server Error)</code>.</p>
  
  <p>I'm afraid that this problem will cause other problems with my app, so I want to get it out of the way. I've tried to do this in my server.js file:</p>
  
  <pre><code>app.get('/favicon.ico', (req, res) =&gt; {
    console.log("got to server")
    res.send("favicon placeholder")
  })
  </code></pre>
  
  <p>Unfortunately, it doesn't change the behaviour of the app. The exact same error happens, and the console.log doesn't output anything, which makes me think that nothing even gets routed to the server. Now, here's the most important question: <strong>Why is this?</strong> Why doesn't the request go to the server?</p>
  
  <p>ADDITIONAL INFO:
  Here's the package.json file of the server, in the home folder.
  home/package.json:</p>
  
  <pre><code>{
    "name": "sentify-server",
    "version": "1.0.0",
    "scripts": {
      "client": "cd client &amp;&amp; yarn start",
      "server": "nodemon server.js",
      "dev": "concurrently --kill-others-on-fail \"yarn server\" \"yarn client\""
    },
    "dependencies": {
      "express": "^4.16.3"
    },
    "devDependencies": {
      "concurrently": "^3.5.0"
    }
  }
  </code></pre>