Open rupa29 opened 3 years ago
Hi @rupa29, is it possible for you to provide a code snippet? Are you using the provided setHeaders()
hook in your ProxyConfig
which is still stripping out your cookies?
See https://github.com/chimurai/http-proxy-middleware/issues/472#issuecomment-787473184 as well, could be related.
Hi @CobyPear I'm not allowed to share the code. Will you be available for a call? I can go over what we are doing. We use setHeaders in the proxy config but cookies are set before that.
@rupa29 Our product team, who supports GitHub issues, can't do calls. Perhaps you could reproduce the issue in a simpler, non-customer codebase which you are able to share? Otherwise you can utilize Sitecore Support.
@nickwesselman We will be reaching out to Sitecore Support. Thank you
@rupa29 Were you able to resolve this?
@nickwesselman We are able to find a work around for now. But we want this to be fixed
@rupa29 Can you provide the internal ticket # so we can reference?
@nickwesselman Here it is CS0273427
@rupa29 Looks like we are still awaiting a sample that demonstrates the issue there as well.
@nickwesselman We demonstrated the issue to one of the sitecore team members they are aware of the issue.
Description
We are adding cookies and version header( a custom one we add to show the git commit number in the response) to the response using express before sending the request to SSR proxy. I see the version header in the browser but not the cookies. When I try to log the ServerResponse from config setHeaders I see the cookies. When I log from createViewBag I don't see cookies in the serverResponse object anymore but i can see version header.
Expected behavior
Take into account cookies added by express when handling proxyResponse in SSR Proxy.
Steps To Reproduce
Using express, add cookies to the response before ssr proxy is registered.
Possible Fix
Don't delete set-cookie headers from serverResponse object and include them in the final response.
Your Environment