Skip to content

Add unescape-safestr header to both fides-js fetch and privacy center calls #3706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ The types of changes are:
- Handle names with a double underscore when processing access and erasure requests [#3688](https://github.com/ethyca/fides/pull/3688)
- Broken link to Fides docs site on the About Fides page in Admin UI [#3643](https://github.com/ethyca/fides/pull/3643)
- Add Systems Applicable Filter to Privacy Experience List [#3654](https://github.com/ethyca/fides/pull/3654)
- Privacy center and fides-js now pass in `Unescape-Safestr` as a header so that special characters can be rendered properly [#3706](https://github.com/ethyca/fides/pull/3706)

### Developer Experience
- Reorganized some `api.api.v1` code to avoid circular dependencies on `quickstart` [#3692](https://github.com/ethyca/fides/pull/3692)

### Changed
Expand Down
1 change: 1 addition & 0 deletions clients/fides-js/src/services/fides/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const fetchExperience = async (
const fetchOptions: RequestInit = {
method: "GET",
mode: "cors",
headers: [["Unescape-Safestr", "true"]],
};
const params = new URLSearchParams({
show_disabled: "false",
Expand Down
1 change: 1 addition & 0 deletions clients/privacy-center/common/CommonHeaders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ export function addCommonHeaders(headers: Headers, token?: string | null) {
if (token) {
headers.set("authorization", `Bearer ${token}`);
}
headers.set("Unescape-Safestr", "true");
return headers;
}