fpWeb and sessions lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- krolikbest · 2023-04-17 19:43 Hi, I would like to ask if is it current and proper way to use session like described in this topic: https://forum.lazarus.freepascal.org/ind ex.php/topic,43256.msg302446.html#msg302446 ? ---------------------------------------------------------------------- Leledumbo · 2023-04-19 10:00 Just checked, the last attachement still works as expected, so yes. ---------------------------------------------------------------------- krolikbest · 2023-04-19 18:09 Thanks for checking. In the meantime, I realized my own idea for the sessions. In a nutshell, it involves using some sort of list, such as TStringList. There are stored so called session names (generated via Random procedure) when a new client (browser) logs into my http server. In few days I should show on my youtube some experiments with fphttpserver, pas2js, Raspberry Pi and esp8266 ---------------------------------------------------------------------- egsuh · 2023-04-20 04:22 HTTP Server may use TStringList for session management. But it's not portable to CGI model. Anyway I'm interested in your example. ---------------------------------------------------------------------- Leledumbo · 2023-04-20 08:39 The backend could be anything. Really the only connection a session has is its key cookie. Like egsuh said, though, TStringList won't survive one shot execution model employed by CGIs. Unless, you (Save|Load)FromFile accordingly. I usually just use Redis for session, as it has built-in expiration mechanism fully user controllable from query. ---------------------------------------------------------------------- krolikbest · 2023-04-20 10:52 My solution is standalone httpserver working on Raspberry Pi. still I have some minor issues to configure RPi for working in to wifi subnets (RPi has two interfaces). One wifi is for working in range of my main home router, and second subnet is for working between RPi and few esp8266. Describing my problem with configuration of RPi is boring to read but i'm making some progress