Skip to content

Commit ef84043

Browse files
author
Oleksii Korshenko
committed
MAGETWO-70591: magento/magento2:#6175 Fixed Unable to generate unsecure URL if current URL is secure #10188
- changed flag to _secure_forced to be consistent with previous implementation
1 parent 515eb5e commit ef84043

File tree

1 file changed

+7
-1
lines changed
  • lib/internal/Magento/Framework

1 file changed

+7
-1
lines changed

lib/internal/Magento/Framework/Url.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,13 @@ protected function _getType()
362362
protected function _isSecure()
363363
{
364364
if ($this->_request->isSecure()) {
365-
if($this->getRouteParamsResolver()->hasData('secure')){
365+
/**
366+
* Allow generate programmatically non-secure URL in secure area
367+
*
368+
* @see https://github.com/magento/magento2/issues/6175
369+
* @se https://github.com/magento/magento2/pull/10188
370+
*/
371+
if ($this->getRouteParamsResolver()->hasData('secure_is_forced')) {
366372
return (bool) $this->getRouteParamsResolver()->getData('secure');
367373
}
368374
return true;

0 commit comments

Comments
 (0)