I do not how to ask the question, but I am confused by how to manage sessions when the server is at local host.
Accessing the database direct
Without a middleware (REST), sessions are created as soon as you connect to the database. Even 2 connections from same computer gets 2 separate sessions.
Accessing via REST and localhost (127.0.0.1)
Using a middleware, all connections goes through 127.0.0.1 and there will be only 1 single session.
Is there a way to add unique sessions connecting the database when using localhost?
Any clue to handle this is appreciated.