<p>I start the app using yarn, in my local machine, configure a local nginx service listening on the port 8083, and the yarn service listening with port 3000, when the url path start with <code>/manage</code>, forward the http request to the backend service deployment in the remote kubernetes cluster. This is my local nginx forward config:</p>
<pre><code>server {
        listen 8083;
        server_name admin.reddwarf.com;
        location / {
            proxy_pass http://127.0.0.1:3000;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection &quot;Upgrade&quot;;
        }
        location ^~ /manage/ {
            proxy_pass  https://admin.example.top;
            proxy_redirect off;
            proxy_set_header Host https://admin.example.top;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
}
</code></pre>
<p>In the kubernetes cluster, I am using traefik to forward the http request, it forward by the http <code>host</code> header. This is the traefik config:</p>
<pre><code>  routes:
    - kind: Rule
      match: Host(`admin.example.top`) &amp;&amp; PathPrefix(`/manage`)
      priority: 2
      services:
        - name: dolphin-gateway
          port: 8081
</code></pre>
<p>now the http request give 404 not found error, I am sure the api path exists becuase I could invoke api in the test tools. I think the request send from local debugging app was <code>localhost:8083</code> that make the traefik could not recognize the request correctly. what should I do to change the local machine header to <code>admin.example.top</code> that make traefik could recognize? or my config was mistake? what should I do to make it work as expect? This is the local request demo:</p>
<pre><code>curl 'http://localhost:8083/manage/admin/user/login' \
  -H 'Connection: keep-alive' \
  -H 'sec-ch-ua: &quot; Not A;Brand&quot;;v=&quot;99&quot;, &quot;Chromium&quot;;v=&quot;96&quot;, &quot;Google Chrome&quot;;v=&quot;96&quot;' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'DNT: 1' \
  -H 'Content-Type: application/json;charset=UTF-8' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36' \
  -H 'sec-ch-ua-platform: &quot;macOS&quot;' \
  -H 'Origin: http://localhost:8083' \
  -H 'Sec-Fetch-Site: same-origin' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Referer: http://localhost:8083/' \
  -H 'Accept-Language: en,zh-CN;q=0.9,zh;q=0.8,zh-TW;q=0.7,fr;q=0.6' \
  --data-raw '{&quot;phone&quot;:&quot;+8615623741658&quot;,&quot;password&quot;:&quot;123&quot;}' \
  --compressed
</code></pre>

Dolphin
<p>Try add to curl request: <code>-H 'HOST: admin.example.top'</code>. Then update your nginx config:</p>
<pre><code>server {
  listen 8083;
  server_name admin.example.top;
...
</code></pre>
<p>Server block that match the HOST will process the request.</p>
