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

Cookie vs cookie #699

Open
GrumpyMeow opened this issue Jan 6, 2023 · 1 comment
Open

Cookie vs cookie #699

GrumpyMeow opened this issue Jan 6, 2023 · 1 comment

Comments

@GrumpyMeow
Copy link

Hi Midas,

I sometimes see that a cookie-string of ngapimockid=45674567567;ngapimockid=56767856785678 is received by ngapimock-core.
Thus somehow two same named cookies gets added to the request. Probably this is because we use the Webpack-proxy to transport the ngapimock-commands to the ngapimock-app. Thus in our situation the "app-resources", "app-api-calls" and "mock-commands" are all served on the same host. This is probably something specific for our situation.

In Cypress each "mock-command" writes a "wrap {object}" to the Cypress log:
image

When i click this log-entry in the browser-console the object is logged. In this i'm able to see that a Cookie and a cookie header is set. The casing differs and i suspect some components ignores this casing-difference and this results in the two cookie-values.
image

I'm pretty sure the above situation is created by this line:

Cookie: `${this.configuration.identifier}=${this.ngApimockId}`,

@mdasberg
Copy link
Contributor

@GrumpyMeow I have been trying to dive into some logs, but I cannot find anywhere in both cypress and apimock where the cookie is added with a lowercase name.

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