-
Notifications
You must be signed in to change notification settings - Fork 182
SUP-50712: if partner has getEnforceHttpsApi then set protocol to https #13713
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
base: Venus-22.9.0
Are you sure you want to change the base?
Conversation
|
@github-copilot suggest |
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.
Pull request overview
This PR enforces HTTPS protocol for thumbnail URLs when a partner has the enforceHttpsApi flag enabled. The change ensures that entries belonging to partners requiring HTTPS will have their thumbnail URLs generated with the HTTPS protocol.
- Adds partner-level HTTPS enforcement check for thumbnail URL generation
- Passes protocol parameter to
getThumbnailUrl()when HTTPS is enforced
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@github-copilot suggest |
|
@github-copilot suggest |
| else | ||
| { | ||
| $assetUrl = kAssetUtils::getAssetUrl($thumbAsset); | ||
| $assetUrl = self::enforceHttpsIfRequired($thumbAsset->getPartnerId(),$assetUrl); |
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.
missing space after come
| { | ||
| $cdnUrl = $cdnUrlPartners[$thumbAsset->getPartnerId()]; | ||
| $assetUrl = kAssetUtils::getAssetUrl($thumbAsset, false, null, null, '', $cdnUrl); | ||
| $assetUrl = self::enforceHttpsIfRequired($thumbAsset->getPartnerId(),$assetUrl); |
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.
missing space after come
| $partner = PartnerPeer::retrieveByPK($partnerId); | ||
| if ($partner && $partner->getEnforceHttpsApi()) | ||
| { | ||
| $url = str_replace('http://', 'https://', $url); |
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.
In case the URL contains http:// more than once, better limit it to the first occurance
if (strpos($url, 'http://') === 0)
{
$url = 'https://' . substr($url, 7);
}
Pull Request Checklist
Please complete the following before submitting:
General notes -
New Kaltura Types
New Kaltura Services / Actions
Questions
What is the purpose of this PR?
Does this change affect production code or infrastructure?
If yes, what is the rollback plan?