Initial commit: custom PrestaShop 9 EduBox image

This commit is contained in:
2026-06-20 20:32:55 +00:00
commit d97a78e6b6
16 changed files with 466 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
--- a/src/Adapter/Assets/AssetUrlGeneratorTrait.php
+++ b/src/Adapter/Assets/AssetUrlGeneratorTrait.php
@@ -49,12 +49,14 @@ trait AssetUrlGeneratorTrait
protected function getFQDN()
{
if (null === $this->fqdn) {
- if ($this->configuration->get('PS_SSL_ENABLED') && ToolsLegacy::usingSecureMode()) {
- $this->fqdn = $this->configuration->get('_PS_BASE_URL_SSL_');
- } else {
+ // EduBox: rely on the current request security, not on PS_SSL_ENABLED.
+ // Behind the reverse proxy every public request is HTTPS.
+ if (ToolsLegacy::usingSecureMode()) {
+ $this->fqdn = $this->configuration->get('_PS_BASE_URL_SSL_') ?: $this->configuration->get('_PS_BASE_URL_');
+ } else {
$this->fqdn = $this->configuration->get('_PS_BASE_URL_');
}
}
return $this->fqdn;
}