I am facing a problem with revamping the project from React + Nginx to Next.js.
From my old project, the Nginx has a reverse proxy to redirect all API requests to another API server.
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;
}
Is it possible to using Next.js to do this job instead of Nginx?