title: AWS Amplify 405 MethodNotAllowed error in POST method with Nuxt.js Proxy
body: <p>An attempt to integrate an API with my application that was built using Nuxt.js and hosted with AWS Amplify. I've added a proxy, it works perfectly in local but it returns <strong>405 MethodNotAllowed</strong> in AWS server for a POST method.</p>
  <p>For the proxy, I've made the changes as following to rewrite the path:</p>
  <pre><code>axios: {
   proxy: true
  },
  proxy: {
   '/lead/': { target: 'https://api.apidomain.org/v2', pathRewrite: { '^/lead/': '' }, 
    changeOrigin: true }
  },
  </code></pre>
  <p>I've read the Amplify <a href="https://docs.aws.amazon.com/amplify/latest/userguide/redirects.html" rel="nofollow noreferrer">documentation</a> where we can update the redirects so I've tried</p>
  <pre><code>[
  {
      &quot;source&quot;: &quot;/&lt;*&gt;&quot;,
      &quot;target&quot;: &quot;/index.html&quot;,
      &quot;status&quot;: &quot;404-200&quot;,
      &quot;condition&quot;: null
  },
  {
      &quot;source&quot;: &quot;&lt;/^[^.]+$|\\.(?!(css|gif|ico|jpg|js|png|txt|svg|woff|ttf|map|json)$)([^.]+$)/&gt;&quot;,
      &quot;target&quot;: &quot;/index.html&quot;,
      &quot;status&quot;: &quot;200&quot;,
      &quot;condition&quot;: null
  },
  {
      &quot;source&quot;: &quot;/lead/&lt;*&gt;&quot;,
      &quot;target&quot;: &quot;https://api.apidomain.org/v2/&lt;*&gt;&quot;,
      &quot;status&quot;: &quot;200&quot;,
      &quot;condition&quot;: null
  }
  ]
  </code></pre>
  <p>The first two rules are the defaults and I added the third rule but still getting the 405 MethodNotAllowed error. What am I missing?</p>