Skip to content

Allow hostnames to be resolved to specific IP versions for SK requests #7864

@aaemnnosttv

Description

@aaemnnosttv

Feature Description

Some environments have trouble using Site Kit due to rare complications with default IP resolution. Allowing this to use a specific version can help in some situations.

For more information, see the related functionality in cURL https://daniel.haxx.se/blog/2020/04/20/curl-ootw-ipv4/

Also https://docs.guzzlephp.org/en/6.5/request-options.html#force-ip-resolve


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • A new googlesitekit_force_ip_resolve filter should be implemented
    • Default null
    • The only values allowed/recognized from it other than the default should be the strings v4 and v6
  • The filter should control the IP resolution of requests made by the Google_Site_Kit_Client

Implementation Brief

Test Coverage

  • Update coverage in Client_FactoryTest

QA Brief

  • No QA is needed here. Changes in hte http config are tested using phpunit tests.

Changelog entry

  • Allow the IP version to be specified for server-side requests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Medium priorityPHPType: InfrastructureEngineering infrastructure & tooling

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions