Commit ccc6085f authored by bwaindwain's avatar bwaindwain Committed by Neslee Canil Pinto
Browse files

Issue #3088884 by bwaindwain: Local font CSS is http when site is https

parent eb8503a9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -29,13 +29,14 @@ function local_fonts_page_attachments(&$page) {
      $metadata = $font->getMetadata();
      $font_id = $metadata['id'];
      $directory = file_build_uri('fontyourface/local_fonts/' . $font_id);
      $url = file_create_url($directory . '/font.css');
      $page['#attached']['html_head'][] = [
        [
          '#type' => 'html_tag',
          '#tag' => 'link',
          '#attributes' => [
            'rel' => 'stylesheet',
            'href' => file_create_url($directory . '/font.css'),
            'href' => file_url_transform_relative($url),
            'media' => 'all',
          ],
        ], 'local-fonts-' . $font_id,