-
Notifications
You must be signed in to change notification settings - Fork 28
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
Use https for videos hosted on cdn.theguardian.tv #11690
Conversation
Size Change: 0 B Total Size: 842 kB ℹ️ View Unchanged
|
Hello 👋! When you're ready to run Chromatic, please apply the You will need to reapply the label each time you want to run Chromatic. |
Seen on PROD (merged by @DanielCliftonGuardian 8 minutes and 39 seconds ago) Please check your changes! |
@@ -24,10 +24,14 @@ export const GuVideoBlockComponent = ({ | |||
width: 100%; | |||
} | |||
`; | |||
|
|||
const httpsHtml = html.replaceAll( | |||
new RegExp('http://cdn\\.theguardian\\.tv', 'g'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we not use a simple string rather than a regular expression, here?
What does this change?
This adds a find and replace to switch to using https.
There is a function in frontend which attempts to do this but does not work for many videos as they return empty html strings. https://github.com/guardian/frontend/blob/99c59732f934d181c4ccc43b766558b93dfdeae2/common/app/model/dotcomrendering/pageElements/PageElement.scala#L1021
This should be done upstream however. See https://github.com/guardian/fastly-edge-cache/pull/880 and also for context https://github.com/guardian/content-api/pull/1395
Why?
Videos not playing due to csp rule.
Fixes #11599
Screenshots