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

[Feature Request] Allow for globally disabling cookies on requests #1474

Open
richter-alex opened this issue Apr 30, 2019 · 6 comments
Open
Labels

Comments

@richter-alex
Copy link

  • Insomnia Version: 6.3.2
  • Operating System: Mac OSX Mojave 10.14.4

Details

Quality of life improvement thought:

I work a lot with authenticated REST and GraphQL APIs. In a some cases, the API I'm interacting with does not behave well when the request includes cookies. Shopify's APIs for example behave this way.

To me it seems like it would be super convenient to allow for the ability to globally disable sending cookies with requests, at least as the default state. While I can control it from request-to-request, and that these preferences are inherited if I copy a request with the intended settings, it feels pretty uncomfortable in the cases where I end up having to specify the setting.

@welcome
Copy link

welcome bot commented Apr 30, 2019

👋 Thanks for opening your first issue! If you're reporting a 🐞 bug, please make sure
you include steps to reproduce it. If you're requesting a feature 🎁, please provide real
use cases that would benefit. 👪

To help make this a smooth process, please be sure you have first read the
contributing guidelines.

@richter-alex richter-alex changed the title [Feature Request] Allow for globally disabling cookies with requests [Feature Request] Allow for globally disabling cookies on requests Apr 30, 2019
@gschier
Copy link
Contributor

gschier commented May 4, 2019

I just want to mention here first that you can write a request hook plugin that calls the settingSendCookies(false) method based on the URL of the current request: https://support.insomnia.rest/article/26-plugins#request-hook-api

Personally, if we are to add this as a first-party feature, I feel like a global toggle doesn't make much sense. Rather, a host-based toggle would probably be more appropriate.

@gschier gschier added the N-discussion Needs: Discussion label May 4, 2019
@rafaelrenanpacheco
Copy link
Contributor

A host-based configuration would fit perfectly.

What about the configuration to enable cookies be opt-in instead of opt-out? Insomnia's default behavior would be "no cookies at all". If the user need cookies for some host, then the user must add it to the "hosts with cookies" configuration.

@rafaelrenanpacheco
Copy link
Contributor

rafaelrenanpacheco commented May 10, 2019

This dialog could have 2 sessions:

1º session: A grid to add hosts that allow cookies to be stored and sent.
2º session: List of stored cookies received by Insomnia (the current behavior).

image

@stale
Copy link

stale bot commented Jun 2, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@bpartridge
Copy link

Rebooting this with a suggestion: A global (or per-environment or per-collection) preference for the default state of the per-request store/send cookies checkboxes (upon creating a new request) would be a massive quality-of-life improvement. Something like this interface:

Default Settings for New Requests
[√] Send cookies automatically
[√] Store cookies automatically

As an example use case, we often work with vaguely-documented legacy systems and APIs that change behavior based on cookie session state. We use Insomnia to explore how they work and share results with Insomnia Sync, but we need each request we make to start from the fresh and deterministic slate it would when running from our automation workers: defined explicitly by body/auth/query/headers etc., not cookie state that might change nondeterministically based on whether we've already tried the request before! It's a massive foot-gun that new requests start off with persistent cookie settings, and perhaps the largest annoyance that Insomnia presents right now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants