Password Protection
This week I will be continuing with the same comment app from last post and adding a password to protect it from spam. The app is always up for comments to be posted at http://jpernick.pythonanywhere.com/. The username and password are both "hockey18". *Please click on photos to enlarge them.
How its done
Right now the website can be accessed by anyone which can lead to annoying spam preventing it from being used to the fullest.
Python anywhere gives a really easy way to protect your site. Simply go to the web tab, scroll all the way down and there is a heading called password protection. There is a tab that needs to be switched from disabled to enabled, and then I put in a username and password. (both of which I made "hockey18").
Next it is important to scroll back up to the top of the page and click the green reload button, this applies the changes I just made.
Now when I go to my url http://jpernick.pythonanywhere.com/ I am prompted to put in a username and password. The username is hockey18 and the password is also hockey18.
Once the username and password are entered correctly the app is free to be used regularly. The username and password only have to be entered once a session.
Thank you for reading and please leave comments on anything you would like to see next!
-Joe
No comments:
Post a Comment