title: Nginx proxy_pass on external wordpress blog has 403 error on wp-admin
body: <p>I have a main website (react + next js) on a first domain <a href="http://www.domain.io" rel="nofollow noreferrer">www.domain.io</a> and a wordpress 6.1 blog on blog.domain.io hosted on bluehost.</p>
  <p>I'm serving my blog through a nginx proxy pass at the address: <a href="http://www.domain.io/blog" rel="nofollow noreferrer">www.domain.io/blog</a>.</p>
  <p>I have few issue, especially with our translation plugin, which I believe will be fixed once I have cleaned the wp-admin side.</p>
  <p>And the main issue I have is with the wp-json route.</p>
  <p>Here on my nginx it looks like this:</p>
  <pre><code>    location ~ ^/blog/wp-json/(.*) {
          resolver            8.8.8.8;
          proxy_pass          https://blog.domain.io/wp-json/$1$is_args$args;
          proxy_redirect      off;
          proxy_set_header    Host blog.domain.io;
          proxy_set_header    X-Forwarded-For $remote_addr;
      }
  </code></pre>
  <p>But on wordpress admin side, in the logs I have:</p>
  <pre><code>https://www.domain.io/blog/wp-json/jetpack/v4/jitm?message_path=wp%3Aedit-page%3Aadmin_notices&amp;query=post_type%253Dpage&amp;full_jp_logo_exists=false&amp;_wpnonce=a68d93b7af
  </code></pre>
  <p>that has a status code 403 with response:</p>
  <pre><code>{&quot;code&quot;:&quot;rest_cookie_invalid_nonce&quot;,&quot;message&quot;:&quot;Cookie check failed&quot;,&quot;data&quot;:{&quot;status&quot;:403}}
  </code></pre>
  <p>(same error for all files going through wp-json requests)</p>
  <p>Is it an issue with our nginx not forwarding the cookies properly? How could I do that then?</p>