Skip to content

How to use a local UI DevServer with a remote BFF? #243

Answered by ch4mpy
oravecz asked this question in Q&A
Discussion options

You must be logged in to vote

The problems I run into are related to cookie issues caused by origin mismatch between my localhost and the bff endpoints

That's precisely the purpose of the reverse proxy. The BFF's session cookies are, and should remain, SameSite. Serving both the UI and the BFF with the same origin (a reverse proxy) ensures that requests satisfy SameSite policies.

From the section "3.1. System Overview":

there’s a single point of contact for at least the BFF and the SPA assets: a reverse-proxy

So, when "running the React-UI locally", you should either:

  • configure the DevServer built-in proxy. Details depend on the React framework you're using. For instance, if using Next.js you could use the "rewri…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ch4mpy
Comment options

Answer selected by ch4mpy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants