Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy options get removed in cda client #1821

Open
rustyy opened this issue Jul 15, 2024 · 1 comment
Open

Proxy options get removed in cda client #1821

rustyy opened this issue Jul 15, 2024 · 1 comment

Comments

@rustyy
Copy link

rustyy commented Jul 15, 2024

Issue

With the option deliveryToken only published entries are supposed to be exported.

This fails if the request is executed behind a proxy.
The following code will fail:

import contentful from "contentful-export";

const options = {
    spaceId: "<space-id>",
    managementToken: "<my-cma-token",
    deliveryToken: "<my-delivery-token>",
}

contentful(options)
    .then((result:any) => {
        // ...
    })
    .catch((err:any) => {
        // A request fails if deliveryToken is given and a request is executed behind a proxy
    })

In the index.js the CDA-client is created via initClient(...).

cf-export-index

The initClient function is not aware of all options given and remove possible proxy options passed in by the consumer.

cf-export-init-client

In result the contentful-export fails if used behind a proxy.

Expected behavior

Given proxy-settings should be taken into account if passed in by the consumer together with the deliveryToken.

@david-shibley-contentful

@rustyy Thank you for bringing this to our attention. I agree we should be doing this. I added an item to our backlog to address this but I don't have a current estimate of when we will get to it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants