Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Commit

Permalink
chore: Add crossorigin for preload translation header (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
igorDolzh authored Mar 17, 2023
1 parent cf738b4 commit a975248
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion edge-lambdas/dist/viewer-request/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion edge-lambdas/dist/viewer-response/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion edge-lambdas/src/addons/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export const addPreloadHeader = ({
headers = setHeader(
headers,
'Link',
`</static/translations/${language}/messages.${hash}.js>; rel="preload"; as="script"`
`</static/translations/${language}/messages.${hash}.js>; rel="preload"; as="script"; crossorigin`
)

return {...response, headers}
Expand Down
2 changes: 1 addition & 1 deletion edge-lambdas/src/viewer-response/viewer-response.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ const getTranslationHeaders = ({
? [
{
key: 'Link',
value: `</static/translations/${language}/messages.${preloadHash}.js>; rel="preload"; as="script"`
value: `</static/translations/${language}/messages.${preloadHash}.js>; rel="preload"; as="script"; crossorigin`
}
]
: undefined
Expand Down

0 comments on commit a975248

Please sign in to comment.