I currently have the following configuration in nginx:
location ~* .(png|gif|ico|jpg|jpeg|css|js|svg|woff2|ttf)(\?.*)?$ {
proxy_pass http://nodejs;
}
location / {
return 302 /;
}
This results in all URLs except for known static files to be redirected to the root.
However, I was wondering if it's possible to have nginx just reverse proxy the content of root with a 200, rather than perform a redirect?
Note that try_files /;
instead of return 302 /;
based on some other question/answer didn't work, not sure if that's exactly what I should've tried or not. (Is try_files based on the local file system?? Not applicable here.)