reanahub / reana-ui

REANA UI frontend
http://reana-ui.rtfd.io
MIT License
4 stars 33 forks source link

config: proxy requests to backend when using dev server #335

Closed mdonadoni closed 1 year ago

mdonadoni commented 1 year ago

Configure the development server to proxy /api requests to $REANA_SERVER_URL, instead of making direct requests to $REANA_SERVER_URL from the client. This means that all the requests, including the ones to the REST API, are now made to the same origin. This improves the situation with regard to mechanisms like CORS or SameSite cookies.

Closes #320

mdonadoni commented 1 year ago

Fixed by matching the URLs of Jupyter notebooks. The pattern used to match them is not perfect, as it matches "more" than it should, but I think that's good enough for the development server.