I would like to serve a Captive Portal - page that would prompt the user to agree to certain terms before starting browsing the web from my wireless network (through WiFi) using http.server on my Raspberry Pi that runs the newest version of Raspbian.
I have http.server (comes with Python3) up an running and have a webpage portal.html locally on the Pi. This is the page that I want users to be redirected to when they connect to my Pi. Lets say that the local IP of that page is 192.168.1.5:80/portal.html
My thought is that I would then somehow allow their connection when they have connected and accepted the terms and conditions.
How would I go about that?
You need to work out the document in question, with all the necessary terms and conditions that will link the acceptance of the conditions to a specific user. You can implement a simple login, and link a String (Name - ID) to a Boolean for example, "accepted = true". If you don't need to store the user data, just redirect yo your document and when checked "agree", then you allow the user connection.
How do I implement a simple Captive Portal with `http.server`?