Initial commit: custom PrestaShop 9 EduBox image
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user