Skip to content

Path in hosts configuration is ignored #1377

Closed
@mikevrind

Description

@mikevrind

Summary of problem or feature request

I need to use a host in which Elastic is available via a subfolder. The host is being carried on correctly until the Transport class.
There it uses the Node object to build a connection URI but the path part of the configured host is not being used.

Code snippet of problem

private function setupConnectionUri(Node $node, RequestInterface $request): RequestInterface
    {
        $uri = $node->getUri();
        
        return $request->withUri(
            $request->getUri()
                ->withHost($uri->getHost())
                ->withPort($uri->getPort())
                ->withScheme($uri->getScheme())
         );
    }

System details

  • Operating System: RHEL7
  • PHP Version: 8.1
  • ES-PHP client version 8.10.0
  • Elasticsearch version: 7.17.14

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