-
-
Notifications
You must be signed in to change notification settings - Fork 746
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
Added ability to specify cookies #52
Conversation
Using a .JSON file (see cookies.json), you can attach cookies to the phantom page request. This will allow you to capture pages that are behind a login wall.
Very useful for ensuring apps that are only visible post-login still work at common resolutions. +1 |
Sorry about the delay. Vacation and stuff. I agree this is needed, but I'm not sure I agree with the implementation. How about just an option flag: pageres todomvc.com 1400x000 --cookie 'value1; value2; name1=value1' where the value is just a normal cookie or multiple. Thoughts? |
I like both approaches, however if you do need to specify things like the cookie domain (all our sites share a cookie on *.company.tld, for example), the commandline approach, while cleaner, doesn't seem to allow that. |
Yes, it does: pageres todomvc.com 1400x000 --cookie 'reg_fb_gate=deleted; Expires=Thu, 01-Jan-1970 00:00:01 GMT; Path=/; Domain=.example.com; HttpOnly' |
Oh, I do like that format, then. |
With this approach, it seems like you'll only be able to specify one domain / path. So if you have 4 cookies, they'll all have the same domain, path, etc. Is that acceptable? |
Could you use, say |
Yes |
Instead of using a JSON file for cookies, they can just be specified on the command line with a ‘—cookie’ flag.
That is a pretty rough pass at using the |
Can you fix the merge conflict? Your fork is out of date ;) |
Yeah, that was way out of date! Tried to clean up everything, let me know if that fixed it. Have to run at the moment so I won't be able to do any more tonight. |
@green-arrow Still interested? Needs a good rebase. |
Closing for now as a lot has changed since this PR was opened and lack of activity. Would still welcome a PR that adds cookie support according to #52 (comment). |
If anyone is still interested in getting this landed I would happy to receive another PR: #41 |
Using a .JSON file (see cookies.json), you can attach cookies to the
phantom page request. This will allow you to capture pages that are
behind a login wall.
An issue exists for this at: #41