News for hackers. Stuff that matters.
Re:Next.js – A small framework for server-rendered universal... by TheHegemon on Tuesday October 25, 2016 @06:28PM (#12792316)
Grab all the request cookies from the user and pass them along.
Re:Next.js – A small framework for server-rendered universal... by JoshTriplett on Tuesday October 25, 2016 @06:57PM (#12792509)
That sounds like a recipe for a confused deputy (https://en.wikipedia.org/wiki/Confused_deputy_problem).
Re:Next.js – A small framework for server-rendered universal... by couchand on Tuesday October 25, 2016 @09:56PM (#12793323)
All I know about confused deputy is from the Wikipedia article, but it seems like it wouldn't apply in this case. From Wikipedia: "The confused deputy problem occurs when the designation of an object is passed from one program to another, and the associated permission changes unintentionally, without any explicit action by either party. It is insidious because neither party did anything explicit to change the authority."

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.

Re:Next.js – A small framework for server-rendered universal... by idbehold on Tuesday October 25, 2016 @06:39PM (#12792396)
Inside the React component, (wherever this fetch() is being called from), where exactly are the user's cookies accessible from at this point in the code?