File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33from mail import sendEmail
44from flask import Flask , render_template , Response
55from camera import VideoCamera
6+ from flask_basicauth import BasicAuth
67import time
78import threading
89
1213
1314# App Globals (do not edit)
1415app = Flask (__name__ )
16+ app .config ['BASIC_AUTH_USERNAME' ] = 'CHANGE_ME_USERNAME'
17+ app .config ['BASIC_AUTH_PASSWORD' ] = 'CHANGE_ME_PLEASE'
18+ app .config ['BASIC_AUTH_FORCE' ] = True
19+
20+ basic_auth = BasicAuth (app )
1521last_epoch = 0
1622
1723def check_for_objects ():
@@ -28,6 +34,7 @@ def check_for_objects():
2834 print "Error sending email: " , sys .exc_info ()[0 ]
2935
3036@app .route ('/' )
37+ @basic_auth .required
3138def index ():
3239 return render_template ('index.html' )
3340
Original file line number Diff line number Diff line change 11imutils
22flask
33picamera [array ]
4+ Flask-BasicAuth == 0.2.0
You can’t perform that action at this time.
0 commit comments