I have two applications, one nodejs and another react app. I user is not logged in, I return the node app, if user is logged in, I want to return the react app index.html
file.
location / {
if ($cookie_isLoggedIn = "true") {
// how can I return the index.html file here ?
}
proxy_pass http://localhost:3000;
}
What I tried so far:
rewrite ^/$ /platform-build/index.html;
- doesn't do anything.alias
androot
are not working insideif
statement.