workers-rs icon indicating copy to clipboard operation
workers-rs copied to clipboard

[Feature] Access to hostMetadata for custom hostnames using the CF Struct

Open mettke opened this issue 1 year ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Description

We are using Cloudflare Custom Hostnames and we are assigning hostMetadata to these hostnames to be able to get information about the project. Unfortunately its currently not possible to get this information from the Cf Struct and it would be very nice if we can add this.

Example Structure:

{
    "clientTcpRtt": 0,
    "longitude": "...",
    "latitude": "...",
    "tlsCipher": "...",
    "continent": "...",
    "asn": 0,
    "clientAcceptEncoding": "...",
    "country": "...",
    "isEUCountry": "",
    "tlsClientAuth": {},
    "postalCode": "...",
    "tlsExportedAuthenticator": {},
    "tlsVersion": "TLSv1.3",
    "city": "...",
    "timezone": "...",
    "hostMetadata": {
        "domain": "custom_data"
    },
    "colo": "...",
    "edgeRequestKeepAliveStatus": 1,
    "requestPriority": "...",
    "botManagement": {},
    "clientTrustScore": 0,
    "region": "...",
    "regionCode": "...",
    "asOrganization": "...",
    "httpProtocol": "HTTP/2"
}

What needs to be done:

mettke avatar Jun 30 '23 10:06 mettke