You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* update env / task examples
* update plugin example to be more realistic
* lint
* more updates
* lint
* few more updates to wording
* Update docs/app/continuous-integration/overview.mdx
* Update docs/api/commands/task.mdx
// the connection strings for different databases could
423
-
// come from the Cypress configuration or from environment variables
423
+
// come from system environment variables
424
424
const connections = {
425
425
stagingA: {
426
426
host: 'staging.my.co',
@@ -507,6 +507,43 @@ on('task', {
507
507
508
508
:::
509
509
510
+
### Accessing secrets securely
511
+
512
+
You can use `cy.task()` to securely access secrets from the Node.js process environment variables. This is the recommended approach for accessing sensitive values like passwords, API keys, or tokens, as they remain in the Node.js process and are not exposed to the browser.
Copy file name to clipboardExpand all lines: docs/api/node-events/browser-launch-api.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ following properties:
54
54
|`preferences`|`object`| An object describing browser preferences. Differs between browsers. See [Change browser preferences](#Change-browser-preferences) for details. |
55
55
|`args`|`string[]`| An array of strings that will be passed as command-line args when the browser is launched. Has no effect on Electron. See [Modify browser launch arguments](#Modify-browser-launch-arguments) for details. |
56
56
|`extensions`|`string[]`| An array of paths to folders containing unpacked WebExtensions to be loaded before the browser starts. See [Add browser extensions](#Add-browser-extensions) for details. |
57
-
|`env`|`object`| An object of environment variables to pass to the launched browser. See [Configure browser environment](#Configure-browser-environment) for details.|
57
+
|`env`|`object`| An object of system environment variables to pass to the launched browser. See [Configure browser environment](#Configure-browser-environment) for details. |
58
58
59
59
## Usage
60
60
@@ -162,7 +162,7 @@ Here are preferences available for the currently supported browsers:
162
162
163
163
:::info
164
164
165
-
If you want to ignore Chrome preferences altogether, you can set `IGNORE_CHROME_PREFERENCES` as an environment variable when running Cypress.
165
+
If you want to ignore Chrome preferences altogether, you can set `IGNORE_CHROME_PREFERENCES` as a system environment variable when running Cypress.
166
166
167
167
:::
168
168
@@ -206,7 +206,7 @@ line switches. The supported switches depend on the Electron version, see
0 commit comments