Skip to content

Commit 7f6e13f

Browse files
committed
Add comment
1 parent f5b5414 commit 7f6e13f

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

dotcom-rendering/src/components/SelfHostedVideoPlayer.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,11 @@ export const SelfHostedVideoPlayer = forwardRef(
184184
}-${atomId}`;
185185

186186
/**
187-
* We need CORS enabled to show subtitles on a video as it allows access to the VTT file.
187+
* To show subtitles, CORS must be enabled as it allows access to the VTT file.
188188
*
189-
* We don't want a client to not request CORS headers on a video request, then to request
190-
* the same video with CORS headers, as the response could be cached without the headers, which
191-
* will result in the video failing to load. Therefore, we always request CORS headers in production.
189+
* CORS should be enabled in production so that requests are consistent with respect to CORS.
190+
* If a client requests a video without CORS, then later made a request to the same video with
191+
* CORS, then this request could fail as the response could be cached without the headers.
192192
*/
193193
const requestCORS =
194194
showSubtitles || process.env.NODE_ENV === 'production';

dotcom-rendering/src/layouts/FrontLayout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ export const FrontLayout = ({ front, NAV }: Props) => {
139139

140140
const contributionsServiceUrl = getContributionsServiceUrl(front);
141141

142-
/** We allow the labs redesign to be shown if:
142+
/**
143+
* We allow the labs redesign to be shown if:
143144
* - the feature switch is ON
144145
* OR
145146
* - the user is opted into the 0% server side test

0 commit comments

Comments
 (0)