Skip to content

CloudServer clientIP 127.0.0.1 not read X-Real-IP nginx proxy-pass #5387

Description

@mewallkit
server {
    listen 443 ssl;
    server_name example.ru;

    ssl_certificate /etc/nginx/ssl/example-ru.crt;`
    ssl_certificate_key /etc/nginx/ssl/example-ru.key;

    location / {
        proxy_pass http://127.0.0.1:8000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

sniffing data

'GET / HTTP/1.0'
'Host: example.ru'
'X-Real-IP: XXX.XXX.XXX.XXX'
'Connection: close', 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0'
...

cloudserver log clientIP 127.0.0.1 not X-Real-IP

what needs to be done, or this behavior is not provided, which is most likely?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions