Skip to content

no option to get ip addresses instead of hostname #26

@exhesham

Description

@exhesham

when i send a curl request to receive the service hosts, i get only hostnames.
curl -X GET http://127.0.0.1:8078/eureka/hosts?appName=s2
when i set the configuration

eureka.instance.preferIpAddress=true

I still get hostnames instead of IP addresses.

In order to get the hostname, i had to change the file HostsHandler.java as follows:
hosts.add(instanceInfo.getIPAddr());

There should be an option to make it configurable

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