Project

General

Profile

Actions

Bug #96835

closed

\TYPO3\CMS\Core\Routing\PageRouter: Default on https when scheme is not configured

Added by Benjamin Serfhos almost 3 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Start date:
2022-02-11
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
easy
Is Regression:
Yes
Sprint Focus:

Description

We have configured a base relative domain for allowing both http and https requests.
For example in sites/<env>/config.yaml:

base: '/'
baseVariants:
  - base: 'www.mylivedomain.com'
    condition: 'applicationContext == "Production/Live"'

This works perfectly how i intend it to work, however when generating urls using PageRouter, the fallback uses http.

When looking at the core I see both fallbacks to go to 'https' and 'http'.

public/typo3/sysext/frontend/Classes/Typolink/PageLinkBuilder.php:437 > defaults to https
public/typo3/sysext/core/Classes/Routing/PageRouter.php:323 > defaults to http

When i adjust the PageRouter default to https it seems to work exactly how i want the site to work but i cannot find a good 'configuration' to set this default. So im forced with xclass or applying patches.

As the 'safe' schemeless `//` is possible as configuration in the backend, it should at least fallback to https as default.

Actions

Also available in: Atom PDF