title: Can I use reverse proxy in Next.js?
body: <p>I am facing a problem with revamping the project from <strong>React + Nginx</strong> to <strong>Next.js</strong>.</p>
  <p>From my old project, the Nginx has a reverse proxy to redirect all API requests to another API server.</p>
  <pre><code>location /api/ {
      resolver 127.0.0.11 valid=30s;
  
      set $${fake}upstream_api ${NGINX_API_PROTO}://${NGINX_API_HOST};
      rewrite ^/api/(.*) /$${fake}1 break;
      proxy_pass $${fake}upstream_api$${fake}uri$${fake}is_args$${fake}args;
  
      include /etc/nginx/json/api_json_errors.conf;
  }
  </code></pre>
  <p>Is it possible to using Next.js to do this job instead of Nginx?</p>