on some forms I added custom redirects, for example on the user login form:
function my_module_user_login_submit(&$form, \Drupal\Core\Form\FormStateInterface $form_state) {
$form_state->setRedirect('view.my_custom_view.page_1');
}
This is working well even with https on my test server: the user will be redirected after login to the view page with https, let's say https://my-domain.de/my-view-page
On another server the same is not working: on this server the domain is only reachable via https - not via http. This means calling http://my-domain.de will lead to a server error only using https://my-domain.de the project will be displayed. Now when I login I will be redirected to http://my-domain.de/my-view-page (without https) which leads to this server error.
I am sucessfully logged in: when I enter https://my-domain.de/my-view-page manually I can reach this know. When logout (I did not any changes here) the same appears: After logout the user gets redirected to http://my-domain.de.
Can somebody give me a hint what can be the problem on the second server?
Best, Tobias
var_dump(\Drupal::request()->server->all());
on the second server and check for headers of a CDN.