question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cookies are sent only for direct requests, not for page resources

See original GitHub issue

Hello. I have simple config:

var config = new Configuration()
                .WithDefaultLoader(setup => setup.IsResourceLoadingEnabled = true)
                .WithCookies();

When I send new request, cookies are sent only with page request, not with requests for page’s resources (images, css files). Am I missing some config settings?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
FlorianRapplcommented, Oct 1, 2016

Fixed, see PR #423.

0reactions
FlorianRapplcommented, Sep 30, 2016

Yes, the resource loader actually never transports the cookie. As an intermediate work-around you could provide your own resource loader that inherits from ResourceLoader and overrides DownloadAsync. In this method you would add the cookie header with the value obtained via a GetCookie(request.Address) call.

A fix to this will be provided with the next release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Avoiding cookies while requesting static content
Cookie are "attached" to a domain and a path. If you set cookies for a path above your files, they'll be sent with...
Read more >
If browser cookies aren't shared between different websites ...
While it is true that JavaScript has no direct access to the banking session cookie, it could still send and receive requests to...
Read more >
Using HTTP cookies - MDN Web Docs - Mozilla
None specifies that cookies are sent on both originating and cross-site requests, but only in secure contexts (i.e., if SameSite=None then the ...
Read more >
What are HTTP cookies?
Cookies are small pieces of data used as a storage medium in the browser and sent to the server with each request. They...
Read more >
Testing for Cookies Attributes
In other words, the data associated with the cookie will only be sent on requests matching the current site shown on the browser...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found