1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

whitespace

This commit is contained in:
Jerry Vonau 2018-07-04 08:30:53 -05:00
parent 5674675ef9
commit 418d941833
2 changed files with 6 additions and 6 deletions

View file

@ -74,7 +74,7 @@
include_tasks: squid.yml
when: FQDN_changed and squid_install and iiab_stage|int == 9
#- name: FOREFULLY ENABLE CAPTIVE PORTAL
#- name: FOREFULLY ENABLE CAPTIVE PORTAL
# set_fact:
# py_captive_portal_install: True

View file

@ -7,9 +7,9 @@ import BaseHTTPServer
import cgi
# These variables are used as settings
PORT = int("{{ captive_portal_port }}") # the port in which the captive portal web server listens
PORT = int("{{ captive_portal_port }}") # the port in which the captive portal web server listens
IFACE = "{{ iiab_lan_iface }}" # the interface that captive portal protects
IP_ADDRESS = "172.18.96.1" # the ip address of the captive portal (it can be the IP of IFACE)
IP_ADDRESS = "172.18.96.1" # the ip address of the captive portal (it can be the IP of IFACE)
'''
This it the http server used by the the captive portal
@ -40,7 +40,7 @@ class CaptivePortal(BaseHTTPServer.BaseHTTPRequestHandler):
</body>
</html>
"""
'''
if the user requests the login page show it, else
use the redirect page
@ -62,7 +62,7 @@ class CaptivePortal(BaseHTTPServer.BaseHTTPRequestHandler):
self.send_header("Content-type", "text/html")
self.end_headers()
form = cgi.FieldStorage(
fp=self.rfile,
fp=self.rfile,
headers=self.headers,
environ={'REQUEST_METHOD':'POST',
'CONTENT_TYPE':self.headers['Content-Type'],
@ -81,7 +81,7 @@ class CaptivePortal(BaseHTTPServer.BaseHTTPRequestHandler):
else:
#show the login form
self.wfile.write(self.html_login)
#the following function makes server produce no output
#comment it out if you want to print diagnostic messages
#def log_message(self, format, *args):