-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
envrnm't middleware; disclaimer on hazards of non-prod'n, non-HTTPS site
- Loading branch information
1 parent
dfeed00
commit e55f7b1
Showing
5 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import settings | ||
|
||
class FinetoothEnvironmentMiddleware: | ||
def process_request(self, request): | ||
request.possible_environments = settings.Environment | ||
request.environment = settings.ENVIRONMENT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<div class="alert alert-warning"> | ||
<p> | ||
<i class="glyphicon glyphicon-warning-sign"></i> | ||
This instance of the Finetooth software is being run for | ||
<strong>purposes of demonstration only</strong>. The site | ||
operators make no promises about the integrity of your data. (That | ||
is, if we take the site down or delete stuff for some reason or no | ||
reason, we won't feel bad about it.) | ||
</p> | ||
<p> | ||
{% if not request.is_secure %} | ||
Relatedly, this page is <em><strong>not</strong></em> being | ||
served over an encrypted connection! (Sorry.) It is | ||
technologically feasible for third parties to intercept your | ||
password! <strong>Don't reuse a password here</strong> that you | ||
care about being kept secret! | ||
{% endif %} | ||
</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters