{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleChrome/sw-toolbox/issues/35","labels_url":"https://api.github.com/repos/GoogleChrome/sw-toolbox/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/GoogleChrome/sw-toolbox/issues/35/comments","events_url":"https://api.github.com/repos/GoogleChrome/sw-toolbox/issues/35/events","html_url":"https://github.com/GoogleChrome/sw-toolbox/issues/35","id":107649826,"number":35,"title":"Unable to match API requests","user":{"login":"localnerve","id":2454740,"avatar_url":"https://avatars.githubusercontent.com/u/2454740?v=3","gravatar_id":"","url":"https://api.github.com/users/localnerve","html_url":"https://github.com/localnerve","followers_url":"https://api.github.com/users/localnerve/followers","following_url":"https://api.github.com/users/localnerve/following{/other_user}","gists_url":"https://api.github.com/users/localnerve/gists{/gist_id}","starred_url":"https://api.github.com/users/localnerve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/localnerve/subscriptions","organizations_url":"https://api.github.com/users/localnerve/orgs","repos_url":"https://api.github.com/users/localnerve/repos","events_url":"https://api.github.com/users/localnerve/events{/privacy}","received_events_url":"https://api.github.com/users/localnerve/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-22T05:45:01Z","updated_at":"2015-12-11T18:37:32Z","closed_at":"2015-09-22T15:11:29Z","body":"I'm trying to match API requests that use cookie and qstring CSRF parameters.\r\nI seem to be unable to match API requests in the cache.\r\n\r\nI've verified the responses are getting into the cache, but I'm unable to match the key with subsequent requests.\r\n\r\nItems of note:\r\n1. Even though I specify { credentials: 'include' } in the Request, the Request that gets stored in the cache is { credentials: 'omit' }.\r\n2. No way to send { ignoreSearch: true } to cache.match options.\r\n3. vary: Accept-Encoding (Content-Encoding: gzip)\r\n\r\nExample, CSRF tokens at end of url:\r\n```\r\nKey Url (Request in cache associated with response):\r\nhttp://localhost:3000/_api/page;format=markdown;models=%5B%22LocalBusiness%22%2C%22SiteInfo%22%5D;pageTitle=About;resource=about;url=https%3A%2F%2Fapi.github.com%2Frepos%2Flocalnerve%2Fflux-react-example-data%2Fcontents%2Fpages%2Fabout.md?_csrf=DgDQBtRH-qbZvUXqBhAz6lsYwiE-JazMUjLs\r\n\r\nOffline Url (Request made while offline, does not match):\r\nhttp://localhost:3000/_api/page;format=markdown;models=%5B%22LocalBusiness%22%2C%22SiteInfo%22%5D;pageTitle=About;resource=about;url=https%3A%2F%2Fapi.github.com%2Frepos%2Flocalnerve%2Fflux-react-example-data%2Fcontents%2Fpages%2Fabout.md?_csrf=4Uq9fOBW-GYJRq-wjE_uaPjNW_QBlQutIp6I\r\n```\r\nI played around with my own version of sw-toolbox that added { ignoreSearch: true } in a specific case (for offline cache fallback), but did not get results.\r\n\r\nI'm still looking for clear reason why I can't match the Request, but haven't found one just yet.\r\nIdeas?"},"comment":{"url":"https://api.github.com/repos/GoogleChrome/sw-toolbox/issues/comments/164013053","html_url":"https://github.com/GoogleChrome/sw-toolbox/issues/35#issuecomment-164013053","issue_url":"https://api.github.com/repos/GoogleChrome/sw-toolbox/issues/35","id":164013053,"user":{"login":"localnerve","id":2454740,"avatar_url":"https://avatars.githubusercontent.com/u/2454740?v=3","gravatar_id":"","url":"https://api.github.com/users/localnerve","html_url":"https://github.com/localnerve","followers_url":"https://api.github.com/users/localnerve/followers","following_url":"https://api.github.com/users/localnerve/following{/other_user}","gists_url":"https://api.github.com/users/localnerve/gists{/gist_id}","starred_url":"https://api.github.com/users/localnerve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/localnerve/subscriptions","organizations_url":"https://api.github.com/users/localnerve/orgs","repos_url":"https://api.github.com/users/localnerve/repos","events_url":"https://api.github.com/users/localnerve/events{/privacy}","received_events_url":"https://api.github.com/users/localnerve/received_events","type":"User","site_admin":false},"created_at":"2015-12-11T18:37:32Z","updated_at":"2015-12-11T18:37:32Z","body":"Any update on `ignoreSearch` availability?\r\n\r\nA growing amount of my code works around this.\r\n\r\nIt forces me to duplicate sw-toolbox strategies in my own code, where the principal difference is only that one request for the network is passed in, and a different request for the cache is used.\r\n\r\n`ignoreSerarch` is sorely being missed by me."}}