CSS and JS loaded via http not https causes browser to warning about site containg insecure content

Created on 4 July 2012, almost 12 years ago
Updated 10 January 2024, 5 months ago

I enabled https for my site (exact same URL for http and https - lets say myexample.com), enabled securelogin, set the base URL in admin/config/people/securelogin to http://myexample.com .
in settings.php:

$base_url = 'http://myexample.com';
$cookie_domain = 'myexample.com';
$conf['https']=false;

Now, when one connects via https; there are warnings about mixed content, which look pretty dramatic to a normal user.
This is due to links in the html to Drupal css+js, that use http (not https).

FIX: Do not set the base_url above.
I'm documenting this, in case it happens to others :-)

πŸ’¬ Support request
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡­Switzerland boran

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡±Netherlands nikhileshpaul Eindhoven

    #14 indeed works for any use case (I'm on core version 9). This is an apache level fix so should be treated as the accepted answer.

  • πŸ‡ΊπŸ‡ΈUnited States mfb San Francisco

    @nikhileshpaul this issue was filed re: Drupal 7; there is no "accepted answer" in this issue for later versions of Drupal.

Production build 0.69.0 2024