{"_id":"56995ac8113a901900ef8f78","user":"568fffce769f210d0013258f","version":{"_id":"568fde82b700ce0d002f4b46","__v":23,"project":"568fde81b700ce0d002f4b43","createdAt":"2016-01-08T16:06:26.373Z","releaseDate":"2016-01-08T16:06:26.373Z","categories":["568fde82b700ce0d002f4b47","568ff0e504440a1700e4cbbd","569002f19ebef90d0087289d","569004f4769f210d00132599","5690056d9ebef90d008728a0","569005d394c5030d0028813a","5690067804440a1700e4cbe2","569137eb3c4f510d00ec9b92","56913815e56a790d008dbfe3","569138ba3c4f510d00ec9b93","5691392f3c4f510d00ec9b94","56913bbe72f2810d007e4cb0","56933b8d6ebadc0d005b71d2","56933b8d6ebadc0d005b71d3","569564facaa32519009c41e6","5696a319b6d61f0d00acfb40","5696a319a857080d0082e8e8","5697efe43503e40d0061f4d1","5697efe48d2a770d00d2fd16","569e9597ffccd10d00a05c59","56a7a1523d33bc2100793d5c","56a7a32ecf6d771700baeee8","56b8b0f7ddeb231700e69825"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"bar","version_clean":"1.0.0","version":"1.0"},"parentDoc":null,"project":"568fde81b700ce0d002f4b43","__v":0,"category":{"_id":"5697efe48d2a770d00d2fd16","version":"568fde82b700ce0d002f4b46","__v":50,"pages":["5697f9021c4dc823005426a7","5697f9a7d231880d00676f88","5697f9a72cf4060d004eaa98","5697f9a71c4dc823005426a9","5697f9a82cf4060d004eaa99","5697f9a82cf4060d004eaa9a","5697f9a81c4dc823005426aa","5697f9a869393517000c8451","5697f9a73503e40d0061f4e1","5697f9a869393517000c8452","5697f9a92cf4060d004eaa9b","5697f9a88560a60d00e2c398","5697f9a81c4dc823005426ab","5697fe158560a60d00e2c3a6","5697fe15d231880d00676f8e","56995ac8cb127f0d003cc165","56995ac854d7db17000ee9e5","56995ac8113a901900ef8f78","56995ac8113a901900ef8f77","56a0ff2a8b2e6f0d0018e94b","56ab8b29c159aa0d0070de3d","56ab8b290b9e0b0d00616230","56ab8b294e8ba20d006a2377","56ab8b2935138c0d005c944e","56ab8b2af25f160d00e17ef8","56ab8b624e4b730d009eb09e","56ab8b62f25f160d00e17ef9","56ab8b62d4432d1900eed1b0","56ab8b62678b58170031ebb2","56ab8b62678b58170031ebb1","56ab8bf435138c0d005c9450","56ab8bf44e4b730d009eb0a1","56ab8bf435138c0d005c9451","56ab8bf5f9757e0d007c65e7","56ab8bf58beeff0d003b809a","56ab8c3ef25f160d00e17efc","56ab8c3f4e8ba20d006a237a","56ab8c3f8beeff0d003b809b","56ab8c3f4e4b730d009eb0a2","56ab8c3f0b9e0b0d00616234","56ab8c704e4b730d009eb0a3","56ab8c709327b30d00f7c1f1","56ab8c714e8ba20d006a237c","56ab8c71f9757e0d007c65e9","56ab8c71f9757e0d007c65ea","56ab8ce8678b58170031ebbd","56ab8ce78beeff0d003b809d","56ab8ce70b9e0b0d00616237","56ab8ce84e4b730d009eb0a4","56ab8ce84e8ba20d006a237d"],"project":"568fde81b700ce0d002f4b43","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-01-14T18:58:44.771Z","from_sync":false,"order":3,"slug":"cypress-api","title":"Cypress API"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-01-15T20:47:04.875Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"auth":"required","params":[],"url":""},"isReference":false,"order":5,"body":"Any configuration you pass to [`cy.server`](https://on.cypress.io/api/server) will only persist until the end of the test. If you find yourself passing the same configuration to each [`cy.server`](https://on.cypress.io/api/server), then you might want to permanently change the default options for all [`cy.server`](https://on.cypress.io/api/server) instances.\n\n***\n\n# [Cypress.Server.defaults( *object* )](#section-usage)\n\nChange default configuration for [`cy.server`](https://on.cypress.io/api/server)\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"A great place to put this configuration is in your `cypress/support/defaults.js` file, since it is loaded before any test files are evaluated.\"\n}\n[/block]\n\n***\n\n# Usage\n\n[block:code]\n{\n    \"codes\": [\n        {\n            \"code\": \"// pass anything here you'd normally pass\\n// to cy.server(). These options will be the new defaults.\\nCypress.Server.defaults({\\n  delay: 500,\\n  force404: false,\\n  whitelist: function(xhr){\\n    // handle custom logic for whitelisting\\n  }\\n})\\n\",\n            \"language\": \"javascript\"\n        }\n    ]\n}\n[/block]","excerpt":"Permanently override default server options","slug":"api-server","type":"basic","title":"Server"}

Server

Permanently override default server options

Any configuration you pass to [`cy.server`](https://on.cypress.io/api/server) will only persist until the end of the test. If you find yourself passing the same configuration to each [`cy.server`](https://on.cypress.io/api/server), then you might want to permanently change the default options for all [`cy.server`](https://on.cypress.io/api/server) instances. *** # [Cypress.Server.defaults( *object* )](#section-usage) Change default configuration for [`cy.server`](https://on.cypress.io/api/server) [block:callout] { "type": "info", "body": "A great place to put this configuration is in your `cypress/support/defaults.js` file, since it is loaded before any test files are evaluated." } [/block] *** # Usage [block:code] { "codes": [ { "code": "// pass anything here you'd normally pass\n// to cy.server(). These options will be the new defaults.\nCypress.Server.defaults({\n delay: 500,\n force404: false,\n whitelist: function(xhr){\n // handle custom logic for whitelisting\n }\n})\n", "language": "javascript" } ] } [/block]