Skip to content

SEGMENT_API_HOST integrations['Segment.io'].apiHost cannot hit current host #1198

@ewah

Description

@ewah

To solve 3rd party script issues we want to proxy our own api.segment.io calls

We're ok having it on the same fqdn and routing back w/ nginx/cloudflare/cloudfront/etc.

But it looks like .send() does not give us an opportunity to put in send it as the same
originating domain.

would love for SEGMENT_API_HOST/apiHost just take "/v1", "/segment/v1"

  const apiHost = settings?.apiHost ?? SEGMENT_API_HOST
  const protocol = settings?.protocol ?? 'https'
  const remote = `${protocol}://${apiHost}`
  ....
  
    return client
      .dispatch(
        `${remote}/${path}`,
        normalize(analytics, json, settings, integrations)
      )
      .then(() => ctx)
  

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