mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
whitespace
This commit is contained in:
parent
5674675ef9
commit
418d941833
2 changed files with 6 additions and 6 deletions
|
@ -74,7 +74,7 @@
|
||||||
include_tasks: squid.yml
|
include_tasks: squid.yml
|
||||||
when: FQDN_changed and squid_install and iiab_stage|int == 9
|
when: FQDN_changed and squid_install and iiab_stage|int == 9
|
||||||
|
|
||||||
#- name: FOREFULLY ENABLE CAPTIVE PORTAL
|
#- name: FOREFULLY ENABLE CAPTIVE PORTAL
|
||||||
# set_fact:
|
# set_fact:
|
||||||
# py_captive_portal_install: True
|
# py_captive_portal_install: True
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,9 @@ import BaseHTTPServer
|
||||||
import cgi
|
import cgi
|
||||||
|
|
||||||
# These variables are used as settings
|
# 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
|
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
|
This it the http server used by the the captive portal
|
||||||
|
@ -40,7 +40,7 @@ class CaptivePortal(BaseHTTPServer.BaseHTTPRequestHandler):
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
'''
|
'''
|
||||||
if the user requests the login page show it, else
|
if the user requests the login page show it, else
|
||||||
use the redirect page
|
use the redirect page
|
||||||
|
@ -62,7 +62,7 @@ class CaptivePortal(BaseHTTPServer.BaseHTTPRequestHandler):
|
||||||
self.send_header("Content-type", "text/html")
|
self.send_header("Content-type", "text/html")
|
||||||
self.end_headers()
|
self.end_headers()
|
||||||
form = cgi.FieldStorage(
|
form = cgi.FieldStorage(
|
||||||
fp=self.rfile,
|
fp=self.rfile,
|
||||||
headers=self.headers,
|
headers=self.headers,
|
||||||
environ={'REQUEST_METHOD':'POST',
|
environ={'REQUEST_METHOD':'POST',
|
||||||
'CONTENT_TYPE':self.headers['Content-Type'],
|
'CONTENT_TYPE':self.headers['Content-Type'],
|
||||||
|
@ -81,7 +81,7 @@ class CaptivePortal(BaseHTTPServer.BaseHTTPRequestHandler):
|
||||||
else:
|
else:
|
||||||
#show the login form
|
#show the login form
|
||||||
self.wfile.write(self.html_login)
|
self.wfile.write(self.html_login)
|
||||||
|
|
||||||
#the following function makes server produce no output
|
#the following function makes server produce no output
|
||||||
#comment it out if you want to print diagnostic messages
|
#comment it out if you want to print diagnostic messages
|
||||||
#def log_message(self, format, *args):
|
#def log_message(self, format, *args):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue