Skip to content
This repository was archived by the owner on Nov 10, 2017. It is now read-only.
This repository was archived by the owner on Nov 10, 2017. It is now read-only.

X-Forwarded-For ignored #20

@guruevi

Description

@guruevi

When munkiwebadmin is hidden behind a proxy (eg. nginx or Apache), in the admin view all the computers have as address 127.0.0.1 (or whatever the proxy address is). This seems to be caused by /munkiwebadmin/reports/views.py line 61 using machine.remote_ip = request.META['REMOTE_ADDR'].

According to this documentation: http://www.djangobook.com/en/2.0/chapter17.html a piece of middleware should be able to 'fix' that transparently, alternatively an if/then can be used to check whether certain proxy headers are set. When X-Forwarded-For is set, the first IP should be used as the client IP (remote_addr).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions