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

Include headers in resolveContent result #28

Open
Shelco opened this issue Jul 7, 2022 · 2 comments
Open

Include headers in resolveContent result #28

Shelco opened this issue Jul 7, 2022 · 2 comments

Comments

@Shelco
Copy link
Contributor

Shelco commented Jul 7, 2022

Hi,

We would like to access some custom headers in the reponse from the Content Delivery Api.

Would you consider adding the response.headers (Map<string,string>) to the result of the contentResolver.ts -> resolveContent method?

Thanks

@JohanPetersson
Copy link
Contributor

Hi, could you give an example how you would use it? I'm thinking that making it possible to intercept all API calls might be a better and more general solution.

@Shelco
Copy link
Contributor Author

Shelco commented Jul 7, 2022

In our case the .net backend running optimizely is pre-rendering an epi-form and returning a set cookie header for the anti forgery token. We would like to read this from our backend-for-frontend (which made the call to the .net backend via the cd-js-sdk).

Intercepting api calls sounds interesting. How would you implement this?

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