Changeset 8c0a2ff for asadb/mit


Ignore:
Timestamp:
Jul 7, 2013, 12:27:57 AM (12 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, stable, stage
Children:
e0ed952
Parents:
34339bb
git-author:
Alex Dehnert <adehnert@…> (07/07/13 00:27:57)
git-committer:
Alex Dehnert <adehnert@…> (07/07/13 00:27:57)
Message:

Scripts auth: don't activate on 127.0.0.1 either

The scripts auth module has long delegated to the standard Django auth when the
hostname was localhost, in order to ignore local dev server instances. This
makes it also delegate to standard Django for 127.0.0.1 as well. I'm not sure
why this hadn't come up before now... A quick look at the Django codebase
suggests this isn't a recent change.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asadb/mit/__init__.py

    rd0c7563 r8c0a2ff  
    130130def scripts_login(request, **kwargs):
    131131    host = request.META['HTTP_HOST'].split(':')[0]
    132     if host == 'localhost':
     132    if host in ('localhost', '127.0.0.1'):
    133133        return login(request, **kwargs)
    134134    elif request.META['SERVER_PORT'] == '444':
Note: See TracChangeset for help on using the changeset viewer.