Skip to content

Commit

Permalink
perf: optimize parseCspHeaders (#29887)
Browse files Browse the repository at this point in the history
* fix: optimize parseCspHeaders

* Added changelog notes

* Fix changelog

---------

Co-authored-by: Jennifer Shehane <[email protected]>
  • Loading branch information
Connormiha and jennifer-shehane authored Jul 26, 2024
1 parent 6b761d5 commit 8260150
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

_Released 7/30/2024 (PENDING)_

**Performance:**

- Improved performance of `reduce` in a method within our proxy. Addressed in [#29887](https://github.com/cypress-io/cypress/pull/29887).

**Bugfixes:**

- Fixed an issue where yarn PnP was not working correctly with Cypress and `@cypress/webpack-batteries-included-preprocessor`. Fixes [#27947](https://github.com/cypress-io/cypress/issues/27947).
Expand Down
4 changes: 3 additions & 1 deletion packages/proxy/lib/http/util/csp-header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ export function parseCspHeaders (headers: OutgoingHttpHeaders, headerName: strin
policy = cspRegExp.exec(cspHeader)
}

return [...acc, policies]
acc.push(policies)

return acc
}, [])
}

Expand Down

4 comments on commit 8260150

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 8260150 Jul 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.13.2/linux-arm64/develop-82601500b618e0ae97e9a73dfb7f8f097d835a69/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 8260150 Jul 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.13.2/linux-x64/develop-82601500b618e0ae97e9a73dfb7f8f097d835a69/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 8260150 Jul 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.13.2/darwin-arm64/develop-82601500b618e0ae97e9a73dfb7f8f097d835a69/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 8260150 Jul 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.13.2/darwin-x64/develop-82601500b618e0ae97e9a73dfb7f8f097d835a69/cypress.tgz

Please sign in to comment.