Skip to content

Commit

Permalink
Fix: update ssr.js to include new non ASCII encoding feature flag (#2048
Browse files Browse the repository at this point in the history
)

* update ssr.js

* update changelog
  • Loading branch information
joeluong-sfcc authored Oct 3, 2024
1 parent b2ed898 commit 03b8373
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/pwa-kit-create-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## v3.8.0-dev (Aug 8, 2024)
- Update ssr.js templates to include new feature flag to encode non ASCII HTTP headers [#2048](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2048)

## v3.7.0 (Aug 7, 2024)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,15 @@ const options = {
// Set this to false if using a SLAS public client
// When setting this to true, make sure to also set the PWA_KIT_SLAS_CLIENT_SECRET
// environment variable as this endpoint will return HTTP 501 if it is not set
useSLASPrivateClient: {{answers.project.commerce.isSlasPrivate}}
useSLASPrivateClient: {{answers.project.commerce.isSlasPrivate}},

// If this is enabled, any HTTP header that has a non ASCII value will be URI encoded
// If there any HTTP headers that have been encoded, an additional header will be
// passed, `x-encoded-headers`, containing a comma separated list
// of the keys of headers that have been encoded
// There may be a slight performance loss with requests/responses with large number
// of headers as we loop through all the headers to verify ASCII vs non ASCII
encodeNonAsciiHttpHeaders: true
}

const runtime = getRuntime()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,15 @@ const options = {
// Set this to false if using a SLAS public client
// When setting this to true, make sure to also set the PWA_KIT_SLAS_CLIENT_SECRET
// environment variable as this endpoint will return HTTP 501 if it is not set
useSLASPrivateClient: {{answers.project.commerce.isSlasPrivate}}
useSLASPrivateClient: {{answers.project.commerce.isSlasPrivate}},

// If this is enabled, any HTTP header that has a non ASCII value will be URI encoded
// If there any HTTP headers that have been encoded, an additional header will be
// passed, `x-encoded-headers`, containing a comma separated list
// of the keys of headers that have been encoded
// There may be a slight performance loss with requests/responses with large number
// of headers as we loop through all the headers to verify ASCII vs non ASCII
encodeNonAsciiHttpHeaders: true
}

const runtime = getRuntime()
Expand Down

0 comments on commit 03b8373

Please sign in to comment.