Skip to content

The IP address is not displayed correctly in the log #336

@LongCX

Description

@LongCX

My ferron config:

* {
    protocols "h1" "h2" "h3"
    log_date_format "%Y/%m/%d %H:%M:%S"
    log_format "[{timestamp}] {client_ip} - {header:User-Agent} \"{method} {path_and_query} {version}\" {status_code} {content_length} \"{header:Referer}\""
}
myapp.com {
    root "/var/www/myapp"
    precompressed
    log "/share/logs_ferron/myapp.access.log"
    error_log "/share/logs_ferron/myapp.error.log"
}

But output log access:

Image

The {client_ip} field displays an incorrect value.
Correct:
14.232.208.159
14.232.208.159
213.209.157.58
217.182.64.155

Wrong:
::ffff:14.232.208.159
::ffff:14.232.208.159
::ffff:213.209.157.58
::ffff:217.182.64.155

Please help me check

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions