Partial rewrites using nginx

Anyone here familiar with doing partial rewrites using nginx? I have a setup with three containers: - nginx - legacy app (lives at www.example.com) - new Next.js app Requests to www.example.com/new-feature should use the Next.js app When the Next.js app makes a request to www.example.com/new-feature/endpoint, this should be handled by the legacy app. I'd also like for the legacy app's cookie based auth to work in the Next.js app. I'm sure someone has written a comprehensive article on this before, I just can't seem to figure out what to google for to find it.
7 Replies
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
cje
cje•3y ago
its a work project that is already deep on nginx i'm trying to get buyin on a partial next.js rewrite, buyin on replacing nginx is almost certainly not realistic 😦
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
cje
cje•3y ago
oh like use nginx rewrites to get requests from legacy to next, and next rewrites to get stuff from next back to legacy?
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
cje
cje•3y ago
is it feasible to have /hew-feature/some-page on next.js and /new-feature/api/get-something on the legacy app this way? i guess i could just call them different things to save myself some headache
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server