Install and Configure

Warning

If you’re using HPKP, Django Lookout must be set up on a different domain name.

Step 1: Install

pip install Django-Lookout

Step 2: Update INSTALLED_APPS

Add the app to your project’s settings.py:

INSTALLED_APPS = [
        ...
        'lookout',
        ...
]

Step 3: Configure the API Endpoint

Add the API endpoint to urls.py. This is where you’ll point report-uri on the frontend.

Note

You can set the pattern to whatever you want.

Note

Be mindful of trailing slashes.

urlpatterns = [
        ...
        # Django Lookout
        url(r'^reporting', include('lookout.urls')),
        ...
]

Step 4: Migrate

Run the database migrations:

./manage.py migrate lookout

Step 5: Configure CSP/HPKP

[To do]