73b561ed33
- edubox-tools.patch : getShopDomain/Ssl conservent les ports non standards - edubox-configuration.patch : PS_SHOP_DOMAIN, _PS_BASE_URL_, PS_SSL_ENABLED… résolus dynamiquement - edubox-shop-getbaseurl.patch : Shop::getBaseURL() utilise le host de la requête - edubox-shopurl.patch : getMainShopDomain conserve les ports non standards - edubox-clear-cache-init.sh : vidage des caches à chaque démarrage - seed.ts : passage au tag 9-edubox-9 - README mis à jour avec les nouveaux patches
37 lines
1.6 KiB
Diff
37 lines
1.6 KiB
Diff
--- a/classes/Configuration.php 2026-06-04 14:48:44.000000000 +0000
|
|
+++ b/classes/Configuration.php 2026-06-23 16:27:03.944472677 +0000
|
|
@@ -210,6 +210,33 @@
|
|
Configuration::loadConfiguration();
|
|
}
|
|
|
|
+ // EduBox: dynamic public domains and ports (local access + reverse proxy).
|
|
+ // These keys must be resolved from the current request, not from the DB cache.
|
|
+ if ($key === 'PS_SHOP_DOMAIN' || $key === 'PS_SHOP_DOMAIN_SSL') {
|
|
+ $host = Tools::getHttpHost(false, false, false);
|
|
+ if (substr($host, -3) === ':80' || substr($host, -4) === ':443') {
|
|
+ $host = substr($host, 0, strrpos($host, ':'));
|
|
+ }
|
|
+ return $host;
|
|
+ }
|
|
+ if ($key === 'PS_SSL_ENABLED' || $key === 'PS_SSL_ENABLED_EVERYWHERE') {
|
|
+ return Tools::usingSecureMode() ? '1' : '0';
|
|
+ }
|
|
+ if ($key === '_PS_BASE_URL_') {
|
|
+ $host = Tools::getHttpHost(false, false, false);
|
|
+ if (substr($host, -3) === ':80' || substr($host, -4) === ':443') {
|
|
+ $host = substr($host, 0, strrpos($host, ':'));
|
|
+ }
|
|
+ return 'http://' . $host;
|
|
+ }
|
|
+ if ($key === '_PS_BASE_URL_SSL_') {
|
|
+ $host = Tools::getHttpHost(false, false, false);
|
|
+ if (substr($host, -3) === ':80' || substr($host, -4) === ':443') {
|
|
+ $host = substr($host, 0, strrpos($host, ':'));
|
|
+ }
|
|
+ return 'https://' . $host;
|
|
+ }
|
|
+
|
|
$idLang = self::isLangKey($key) ? (int) $idLang : 0;
|
|
|
|
if (self::$_new_cache_shop === null) {
|