by yamadapc · 10y ago · 0 comments
function ensureServerUrl(url) {
// parse and replace with your server url
// in Este you read from a SERVER_URL environment variable
}
function fetch(url, options) {
url = ensureServerUrl(url);
return fetch(url, options);
}In the case the GP describes, the proxying web server has no additional authority on the API server: if the API route requires a cookie from the user, it doesn't matter whether that's passed directly or proxied.
That being said, feel free to correct me if I'm missing something. Also, thank you very much for giving me the name for this problem, it will come in very handy.